broadinstitute / ichorCNA

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

Rumtime error (Error in lambdas[, , i] <- na.omit(param$lambda) : incorrect number of subscripts) #117

Open yaotianran opened 1 year ago

yaotianran commented 1 year ago

When I run ichorCNV, no matter which coordinate I used, it always raised the following error. SRR2130035_hg38.wig The packages I installed in R

Rscript ~/bin/ichorCNA/scripts/runIchorCNA.R   
   --gcWig ~/bin/ichorCNA/inst/extdata/gc_hg38_1000kb.wig   
   --mapWig ~/bin/ichorCNA/inst/extdata/map_hg38_1000kb.wig  
    --centromere ~/bin/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt   
   --normalPanel ~/bin/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_median_normAutosome_median.rds   
   --includeHOMD False   
   --chrs "paste0(\"chr\", c(1:22))"   
   --chrTrain "paste0(\"chr\", c(1:22))"   
   --estimateNormal True   
   --estimatePloidy True   
   --estimateScPrevalence FALSE   
   --ploidy "c(2)"   -
   -normal "c(0.95, 0.99, 0.995, 0.999)"   
   --maxCN 4   
   --scStates "c()" 
   --txnE 0.9999 
   --txnStrength 10000   
   --id temp 
   --WIG SRR2130035_hg38.wig 
   --outDir ./

Warning message:
In (function (seqlevels, genome, new_style)  :
  cannot switch some of hg19's seqlevels from UCSC to NCBI style
Loading tumour file:temp
Parsing: fixedStep chrom=chr1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr9 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr22 start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Reading GC and mappability files
Parsing: fixedStep chrom=chr1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr9 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr22 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chrX start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chrY start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Parsing: fixedStep chrom=chr1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr9 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chr22 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chrX start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=chrY start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Correcting Tumour
Removed 114 bins near centromeres.
Applying filter on data...
Correcting for GC bias...
Correcting for mappability bias...
Filtering low uniqueness regions with mappability score < 0.9
Determining gender...Gender unknown
Normalizing Tumour by Panel of Normals (PoN)
Outputting to: .//temp.correctedDepth.txt
Warning message:
In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
  collapsing to unique 'x' values
runEM: Initialization
Error in lambdas[, , i] <- na.omit(param$lambda) : 
  incorrect number of subscripts
Calls: HMMsegment -> runEM
Execution halted
teacakedeadlift commented 1 year ago

I'm also getting the same error using ichorCNA in apptainer on a cluster (from here).

Is it a chromosome naming thing?

Edit: If you add --lambda 'c(1500,1500,1500,1500) to Rscript runIchorCNA.R the error goes (sadly the be replaced by another). So looks like it's failing to calculate lambdas from the data.

hyunhwan-jeong commented 1 year ago

@yaotianran, I got the same error, and my solution is replacing ichorCNA to Broad version 0.3.2

Salaheddinekacimi commented 1 year ago

@hyunhwan-jeong How to replaced ichorCNA to Broad version 0.3.2?

Salaheddinekacimi commented 1 year ago

@teacakedeadlift Have you found any solution for your problem?

Salaheddinekacimi commented 1 year ago

@yaotianran Have you found any solution to the problem ?

hyunhwan-jeong commented 1 year ago

@Salaheddinekacimi I just installed using devtools::install_github("broadinstitute/ichorCNA"), and I guess @yaotianran installed one from https://github.com/GavinHaLab/ichorCNA

Salaheddinekacimi commented 1 year ago

@hyunhwan-jeong I tried the last release of the package and it did not work in my corrected depth of coverage file generated there are only infinite value. N.B: I am doing the analysis on targeted sequencing data

SharvariMankame commented 4 months ago

Hi, is there any update on this error?

stefmldk commented 3 months ago

Installing version 0.3.2 can be done via Conda. As can be seen here, a number of different packages have been build including v.0.3.2. I can confirm that installing v.0.3.2 solves this error. However, I cannot recommend the latest version, 0.5.1, as it results in a different error: Error in library(optparse) : there is no package called ‘optparse’ Execution halted

flacchy commented 2 months ago

hello, I am on Version: 0.3.2 and still get this error:

runEM: Initialization
Error in lambdas[, , i] <- na.omit(param$lambda) : 
  incorrect number of subscripts
Calls: HMMsegment -> runEM
Execution halted

any update on how to fix it?