broadinstitute / ichorCNA

Estimating tumor fraction in cell-free DNA from ultra-low-pass whole genome sequencing.
GNU General Public License v3.0
164 stars 88 forks source link

Error in rep.int(rows, nr) : invalid 'times' value #45

Open lbeltrame opened 5 years ago

lbeltrame commented 5 years ago

This was previously reported as #36 but the reporter closed it without any explanation. Loading data gives this cryptic error when trying to get mappability:

Correcting Tumour
Removed 121 bins near centromeres.
Applying filter on data...
Correcting for GC bias...
Correcting for mappability bias...
Filtering low uniqueness regions with mappability score < 0.9
Error in rep.int(rows, nr) : invalid 'times' value
Calls: loadReadCountsFromWig ... standardGeneric -> eval -> eval -> eval -> rep.int -> rep.int

It's not very clear what is the cause of this error, short of digging into the sources.

lbeltrame commented 5 years ago

Command line used:

Rscript ichorCNA/scripts/runIchorCNA.R --id S1 --WIG S1.wig --ploidy "c(2,3)" --normal "c(0.5,0.6,0.7,0.8,0.9)" --maxCN 5 \
--gcWig /opt/bcbio/anaconda/lib/R/library/ichorCNA/extdata/gc_hg38_1000kb.wig \
--mapWig /opt/bcbio/anaconda/lib/R/library/ichorCNA/extdata/map_hg38_1000kb.wig \
--centromere /opt/bcbio/anaconda/lib/R/library/ichorCNA/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt \
--normalPanel /opt/bcbio/anaconda/lib/R/library/ichorCNA/extdata/HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds \
--includeHOMD False --chrs "paste0('chr', c(1:22, \"X\"))" --chrTrain "paste0('chr', c(1:22))" \
--estimateNormal True --estimatePloidy True --estimateScPrevalence True \
--scStates "c(1,3)" --txnE 0.9999 --txnStrength 10000 --outDir results/ \
 --genomeStyle UCSC
lbeltrame commented 5 years ago

And the reason is that I did not count reads on chromosome Y because I knew already that the sample was female. As mentioned in other issues, there should be a way to exclude / force gender.

In addition the error is really cryptic and I had to debug manually to find what was the cause.

waemm commented 5 years ago

@lbeltrame I'm having the same issue, how did you manage to get around this ? do you have to include empty counts for chrY?