broadinstitute / ichorCNA

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

Error: RangedData objects are deprecated and the coercion method from data.fram or DataTable to RangedData is now defunct. #50

Open Isy89 opened 5 years ago

Isy89 commented 5 years ago

Hi, I have been using ichorCNA for some time without problems, but since I updated R to 3.6 and bioconductor to the latest version I run into this error: "Correcting Tumour Loading required package: GenomeInfoDb Error: RangedData objects are deprecated and the coercion method from data.frame or DataTable to RangedData is now defunct. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData Execution halted"

Thanks in advance!

gavinha commented 5 years ago

Hi @Isy89

I made a quick change to GRanges. Please give it a try and let me know if there are any problems. I will leave this issue open until you close it or if I don't hear about any problems for a while.

Thanks, Gavin

Isy89 commented 5 years ago

I will give it a try and let you know! Thanks, Isaac

cebercoto commented 5 years ago

Hi, was this resolved? because I have been getting this for some time now (have cloned got repo today, have reinstalled with both methods recommended again and nothing will do) Cheers

gavinha commented 5 years ago

Hi @cebercoto

I have tried to address all the RangedData deprecation issues and it runs fine for me. If you found another problem, please do show me the output of your error so I can pinpoint where the problem is.

If you are having trouble installing ichorCNA because of this issue, I believe there is another (closed) issue #52 describing this. I had included a fix there.

Hope this helps. Gavin

cebercoto commented 5 years ago

Hi :) thanks for the quick answer. My command would look like: Rscript /home/cebercoto/Downloads/ichorCNA/scripts/runIchorCNA.R --id ${SAMPLE} --WIG ${TUMOUR}${REFERENCE}.wig --NORMWIG ${NORMAL}${REFERENCE}.wig --ploidy "c(2,3)" --normal "c(0.5,0.6,0.7,0.8,0.9)" --maxCN 5 --gcWig /home/cebercoto/Downloads/ichorCNA/inst/extdata/gc_hg38_1000kb.wig --mapWig /home/cebercoto/Downloads/ichorCNA/inst/extdata/map_hg38_1000kb.wig --centromere /home/cebercoto/Downloads/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt --normalPanel /home/cebercoto/Downloads/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_median_normAutosome_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 ./ --exons.bed /data/Resources/BEDs/roche_nimblegen_CMDL_v3_hg38.bed

and the error (with some extra lines above in case it helps point the reason):

Correcting Normal 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 Removed 1 bins near centromeres. Determining gender...Gender male Normalizing by matched normal for ChrX Error: RangedData objects are deprecated and the seqinfo() setter for RangedData objects is now defunct. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData In addition: Warning messages: 1: In dir.create(paste0(outDir, "/", id, "/"), recursive = TRUE) : './/0HVXC6' already exists 2: In regularize.values(x, y, ties, missing(ties)) : collapsing to unique 'x' values 3: In regularize.values(x, y, ties, missing(ties)) : collapsing to unique 'x' values 4: RangedData objects are deprecated. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData 5: RangedData objects are deprecated. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData 6: RangedData objects are deprecated. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData 7: RangedData objects are deprecated. Please migrate your code to use GRanges or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData Execution halted

gavinha commented 5 years ago

Hi @cebercoto

This is related to normalization with the Panel of Normals provided in inst/extdata. I have updated the hg19, 1Mb and 500kb PoN files: Commit https://github.com/broadinstitute/ichorCNA/commit/d1725c811deef170c7f35b431f2a33824eae1030

If you need to create your own PoN, I've updated the script here in this commit (https://github.com/broadinstitute/ichorCNA/commit/bc89d52dc5a02e77094e5ca770c691494aca0911) so that the rds file will be a GRanges object instead of RangedData.

Please let me know if this helps.

Best, Gavin

cebercoto commented 5 years ago

Hi @gavinha

thanks for pointing that out. All my pipelines are set up in hg38, so I will be making my own PON on 38 then (have enough data) and I will let you know if I encounter any problems. On the other hand, could you confirm then that the hg38 PON that comes bundled this would not be working for the GRanges reason at this moment?

Many thanks again :)

Cheers

gavinha commented 5 years ago

Yes, I just updated the hg38 PONs in this last commit https://github.com/broadinstitute/ichorCNA/commit/c9f4378e2749b744719dd3b3fc34fbb7a7bca1dd

Please let me know if it works.

With my limited bandwidth, I'm not always able to test changes thoroughly so your comments have been very useful.

Thanks, Gavin

cebercoto commented 4 years ago

Hi @gavinha,

sorry it took me so long to get back into this, but I finally had time to process our cohorts and it's working brilliantly now for sWGS, WES and Panel data (as good as it can get with panel xD)

many thanks and keep up the excellent work!