ichorCNA icon indicating copy to clipboard operation
ichorCNA copied to clipboard

ERROR : span is too small

Open smangul1 opened this issue 7 years ago • 2 comments

Hi, i am getting this error:

Correcting for GC bias... Error in simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : span is too small Calls: loadReadCountsFromWig -> correctReadCounts -> loess -> simpleLoess In addition: Warning message: In dir.create(paste0(outDir, "/", id, "/"), recursive = TRUE) : '/u/project/zarlab/serghei/code/seeing.beyond.target/LUAD_Mex_P33//LUAD_Mex_P33_T-F1_L_152649.dedup.cleaned' already exists Execution halted

This is the command I am using:

${DIR_CODE}/tools/MiniConda/bin/Rscript ${DIR_CODE}/tools/ichorCNA/scripts/runIchorCNA.R --id $PREFIX
--WIG $SAMPLE.wig --ploidy "c(2,3)" --normal "c(0.5,0.6,0.7,0.8,0.9)" --maxCN 5
--gcWig ${DIR_CODE}/tools/ichorCNA/inst/extdata/gc_hg19_1000kb.wig
--mapWig ${DIR_CODE}/tools/ichorCNA/inst/extdata/map_hg19_1000kb.wig
--centromere ${DIR_CODE}/tools/ichorCNA/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt
--normalPanel ${DIR_CODE}/tools/ichorCNA/inst/extdata/HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds
--includeHOMD False --chrs "c(1:22, "X")" --chrTrain "c(1:22)"
--estimateNormal True --estimatePloidy True --estimateScPrevalence True
--scStates "c(1,3)" --txnE 0.9999 --txnStrength 10000 --outDir $OUTDIR/

Thanks, Serghei

smangul1 avatar Aug 04 '18 22:08 smangul1

Hi @smangul1

This error usually occurs when there there are either (1) too few bins remaining after filtering or (2) the coverage is too low for the loess curve fitting. Do you know the sequencing coverage of your sample?

Have you had any other samples run to completion and that this is just an exception?

If it is because of bins being filtered out, can you try to debug the the R script right before this line and check that tumour_reads contains all the chromosomes and number of rows matching what you expect? https://github.com/broadinstitute/ichorCNA/blob/f2dc65795ac32887aa9ff9152cabf62f96f6ea3e/scripts/runIchorCNA.R#L172

If that doesn't reveal anything, can you debug into the function, right before this line and see if counts is not empty or lacking rows. https://github.com/broadinstitute/ichorCNA/blob/f2dc65795ac32887aa9ff9152cabf62f96f6ea3e/R/utils.R#L102

Let me know what you find.

Best, Gavin

gavinha avatar Aug 07 '18 00:08 gavinha

Just a follow up on this-- I was using the ichorCNA::run_ichorCNA() function from the latest ichorCNA 0.5.0 package available at https://github.com/GavinHaLab/ichorCNA and ran into the same "span is too small" issue.

It seems that in the transition from providing an Rscript that can be run from the command line to a function available in R, the handling of quotes around command lines parameters such as --chrs was left in, meaning that the run_ichorCNA() R function expects that the values of parameters like chrs be in quotes. So even though you're in R, you should use chrs="c(1:22)", and not chrs=c(1:22).

ahstram avatar Sep 29 '23 20:09 ahstram