Code Monkey home page Code Monkey logo

ichorcna's Introduction

Build Status

ichorCNA

ichorCNA is a tool for estimating the fraction of tumor in cell-free DNA from ultra-low-pass whole genome sequencing (ULP-WGS, 0.1x coverage).

ichorCNA Wiki Page

For more details on usage/pipelines, outputs, and FAQs, please visit the GitHub Wiki page for ichorCNA

Description

ichorCNA uses a probabilistic model, implemented as a hidden Markov model (HMM), to simultaneously segment the genome, predict large-scale copy number alterations, and estimate the tumor fraction of a ultra-low-pass whole genome sequencing sample (ULP-WGS).

The methodology and probabilistic model are described in:
Adalsteinsson, Ha, Freeman, et al. Scalable whole-exome sequencing of cell-free DNA reveals high concordance with metastatic tumors. (2017) Nature Communications Nov 6;8(1):1324. doi: 10.1038/s41467-017-00965-y

The analysis workflow consists of 2 tasks:

  1. GC-content bias correction (using HMMcopy)
    a. Computing read coverage from ULP-WGS
    b. Data correction and normalization
  2. CNA prediction and estimation of tumor fraction of cfDNA

Contacts

If you have any questions or feedback, please contact us at:
Email: [email protected]
Google Group: https://groups.google.com/a/broadinstitute.org/forum/?fromgroups&hl=en#!forum/ichorcna

Acknowledgements

ichorCNA is developed and maintained by Gavin Ha, Justin Rhoades, and Sam Freeman.

This work was done in collaboration with

  • Blood Biopsy Group, Group Leader Viktor Adalsteinsson, Broad Institute of MIT and Harvard
  • Laboratory of Matthew Meyerson, Medical Oncology, Dana-Farber Cancer Institute
  • Laboratory of J. Christopher Love, Koch Institute for integrative cancer research at MIT
  • Laboratory of Gad Getz, Cancer Program, Broad Institute

Software License

ichorCNA Copyright (C) 2017 Broad Institute

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ichorcna's People

Contributors

gavinha avatar jurhoades avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ichorcna's Issues

hg38 mappability file

Hi,

I noticed there are no hg38 mappability files included in /inst/extdata/. If no mappability file is provided, hg19 will be used from the ichorCNA package. Since I'm working on hg38, all my other arguments are set to hg38 files. Wouldn't this result in an incorrect normalization for mappability? Will these files for hg38 be uploaded in the future?

Thanks

equivalent files to hg19 extdata for GRCh38

Hi, I am testing ichorCNA on bam files aligned to GRCh38 (chromosomes with 'chr' notation).

I managed to create the wig file, delete the 'chr' from it, but when trying to run ichorCNA, it complains about a mismatch of elements (3053 elements in value to replace 3044). I presume this is because it uses reference files from hg19 in the ichorCNA/extdata folder:

gc_hg19_1000kb.wig
gc_hg19_500kb.wig
GRCh37.p13_centromere_UCSC-gapTable.txt
HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds
HD_ULP_PoN_500kb_median_normAutosome_mapScoreFiltered_median.rds
map_hg19_1000kb.wig
map_hg19_500kb.wig
MBC_315.ctDNA.reads.wig
MBC_315_T2.ctDNA.reads.wig

Would it be possible to generate equivalent files for GRCh38?

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

Hey guys,

So I ran a the command call listed below and have continuously received the following error: Error in rep.int(rows, nr) : invalid 'times' value
Calls: loadReadCountsFromWig ... standardGeneric -> eval -> eval -> eval -> rep.int -> rep.int.

Could you please help me fix this? Thank you.

Rscript /home/users/boniface/ichorCNA/scripts/runIchorCNA.R --id tumor_sample --WIG LIB180124PS_Sol8_S8.wig --ploidy "c(2)" --normal "c(0)" --maxCN 10 --gcWig /home/users/boniface/ichorCNA/inst/extdata/gc_hg19_1000kb.wig --mapWig /home/users/boniface/ichorCNA/inst/extdata/map_hg19_1000kb.wig --centromere /home/users/boniface/ichorCNA/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt --normalPanel /home/users/boniface/ichorCNA/inst/extdata/HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds --includeHOMD False --chrs "c(1:22, "X")" --chrTrain "c(1:22)" --estimateNormal False --estimatePloidy False --estimateScPrevalence False --scStates "c(1)" --txnE 0.9999 --txnStrength 10000 --plotYLim "c(-2,3)" --outDir /home/exacloud/lustre1/SpellmanLab/ram/bash_snakemake/snakemake_scripts/output_ichor_test

Error in Optimization

Hi,

I have pasted code below of error when running ichor_CNA snakemake:

Error in optim(n_prev, fn = completeLikelihoodFun, pType = rep("n", S), :
2 L-BFGS-B needs finite values of 'fn'
1 Calls: HMMsegment -> runEM -> estimateParamsMap

Do you have suggestions on how to resolve this issue? Thank you!

error in breaks

Hi,

I spotted an error with some of my samples, see below. This could be due to not having enough reads, but I was wondering if there is a better way of knowing if that's the case:

2017-12-14 11:44:03 ichorcna STDERR Slurping: .//CEG60-120-8PC_S16_L00.bml.GRCh38.karyo.deduplicated.icna.wig
2017-12-14 11:44:03 ichorcna STDERR Error in (breaks[i] + 1):(breaks[i + 1] - 1) : NA/NaN argument
2017-12-14 11:44:03 ichorcna STDERR Calls: wigToRangedData
2017-12-14 11:44:03 ichorcna STDERR Execution halted

Error in (function (cl, name, valueClass)

hello
I run ichorCNA with this error

Error in (function (cl, name, valueClass)  :
  assignment of an object of class “NULL” is not valid for @‘NAMES’ in an object of class “IRanges”; is(value, "characterORNULL") is not TRUE
Calls: wigToRangedData ... RangedData -> is -> IRanges -> names<- -> names<- -> <Anonymous>

my shell is

readCounter --window 1000000 --quality 20 \
--chromosome "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,X,Y" \
CP1600132.nodup.bam > CP1600132.nodup.wig

and

Rscript /ichorCNA/scripts/runIchorCNA.R  --id CP1600132 \
--WIG CP1600132.nodup.wig \
--gcWig /ichorCNA/extdata/gc_hg38_1000kb.wig \
--centromere /ichorCNA/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt \
--normalPanel /ichorCNA/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 ./

How can I do ?
Thank you for your reply!

metrics definitions

Hi,

Can someone illuminate on the precise metrics definitions for the following ones. I tentatively gave them a colouring, please correct if wrong:


#violet - depends on sample
#green - higher is better
#red - lower is better

			 'tumor_fraction:violet'             => 'tumor fraction in the assayed sample as predicted by ichorCNA',
			 'ploidy:violet'                     => 'total ploidy of the sample as predicted by ichorCNA',
			 'fraction_cna_subclonal:violet'     => 'fraction of subclonal prevalence as predicted by ichorCNA',
			 'fraction_genome_subclonal:violet'  => '',
			 'chrx_median_log_ratio:violet'      => '',
			 'chry_coverage_fraction:violet'     => '',
			 'coverage:violet'                   => '',
			 'gamma_rate_init:violet'            => '',
			 'students_t_precision:green'        => '',
			 'subclone_fraction:violet'          => '',
			 'students_t_mean:red'               => '',
			 'gc-map_correction_mad:red'         => '',

Creation of Mappability Files

Hi,

I'm wondering how the mappability wig files under inst/extdata were created? I'm hoping to create these files with 1kb windows.

Thanks in advance!

Running example file,parameters

Hi,
I am trying to run ichorCNA with the example files provided (MBC_315.ctDNA.reads.wig, MBC_315_T2.ctDNA.reads.wig). Are these the same samples explained in Figure 1.C in the manuscript (Adalsteinsson etal.,2017, Nature Communications)? Could you please give the tumor fraction estimate in these samples and the parameters used (for example: range of initializations for normal fraction (0:35; 0:45; 0:50; 0:65; 0:75; 0:85; 0:95) and tumor ploidy (2; 3; 4) anything else?) so as to replicate the output.
Thank you.

ERROR : span is too small

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

stLikelihood params

EM.R L426: variable assigned as "params" as input
EM.R L431: variable "param" used as input for function get2and3ComponentMixture

This bug causes an error if "param" is not part of the global environment.

Conda recipe is broken on linux

Hi there,

Thanks for this great tool. We have confirmed that your anaconda recipe is broken on linux installations. We simply created a fresh conda environment and use

conda install -c bioconda r-ichorcna

and get the error message:

`UnsatisfiableError: The following specifications were found to be in conflict:

  • r-ichorcna
    Use "conda search --info" to see the dependencies for each package.`

Conda is a widely use and extremely useful tool so it will be a worthy investment to fix this.

Thanks

Creating mappability wig file from UCSC mappability tracks

I was trying to adjust the bin size of 10MB, however, the mappability wig file generated from both Alignability and Uniqueness tracks from UCSC doesn't work along with the R script. The error message kept saying "invalid x for loess function". And the reason is that the generated mappability file contained no value pass the mappability threshold (which is set to 0.9 as default according to utils.R). So Did I chose the wrong mappability tracks? Could you give me some hint about the mappability tracks you use?
When I bypass the mappability wig file, the programme gives me a series of warning about k-d tree limited by memory, and executing ichorCNA with generated normal panel resulted in "Error: INTEGER() can only be applied to a 'integer'". SO How should I fix that?

script folder not in ichorCNA directory

Hi guys,

I tried using the option 1 installation, however upon closer examination, I found that the script folder was not located in the ichorCNA directory?

Could you please tell me how to resolve this? Thank you.

-rw-r--r--. 1 ramra HPCUsers 1009 Aug 7 14:22 DESCRIPTION
drwxr-xr-x. 2 ramra HPCUsers 22 Aug 7 14:22 extdata
drwxr-xr-x. 2 ramra HPCUsers 7 Aug 7 14:22 help
drwxr-xr-x. 2 ramra HPCUsers 4 Aug 7 14:22 html
-rw-r--r--. 1 ramra HPCUsers 33 Aug 7 14:22 INDEX
-rw-r--r--. 1 ramra HPCUsers 35157 Aug 7 14:22 LICENSE
drwxr-xr-x. 2 ramra HPCUsers 8 Aug 7 14:22 Meta
-rw-r--r--. 1 ramra HPCUsers 206 Aug 7 14:22 NAMESPACE
drwxr-xr-x. 2 ramra HPCUsers 5 Aug 7 14:22 R

Confusion about light green or dark green lines/dots

Hi!
In some of the plots that I generated using ichorCNA, some regions are marked as "3 copies" (brown dots) or "1 copy" (dark (!) green dots) and have a bright green line. I assume this means that the subclonal fraction of the tumor is predicted to have 3 or 1 copies of this segment, respectively, whereas the rest of the tumor has 2 copies.
My confusion comes from the following:
Sometimes I have observed regions that have bright green dots with a bright green line. What does it mean? Sometimes the different sub-solutions show the same segment either with dark green dots and a bright green line, or with bright green dots and a bright green line.
Similarly, sometimes they show a segment either with dark green dots and a dark green line, or with bright green dots and a bright green line. These differences seem to heavily influence the prediction of the tumor fraction in some cases.
Could you please explain why that is and maybe add the explanation to the wiki?
Thank you!
image
image
image

Error in seq.default(from = as.integer(tokens[2]), by = as.integer(tokens[3]),

Hi,

I am testing ichorCNA and met some problems. I was not able to find any example files to test from github. So I am using my own data.

After creating wig files for both tumor and normal samples (tumor.wig and normal.wig), the following commend is what I run:
Rscript runIchorCNA.r --id tumor_sample
--WIG tumor.wig --ploidy "c(2,3)" --NORMWIG normal.wig --normal "c(0.5,0.6,0.7,0.8,0.9)" --maxCN 5
--gcWig gc_hg19_1000kb.wig
--mapWig map_hg19_1000kb.wig
--centromere GRCh37.p13_centromere_UCSC-gapTable.txt
--normalPanel 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 ./

I was not able to receive any output. The following is the last a few lines from log:
Parsing: fixedStep chrom=1 start=1 step=1000000 span=1000000
Error in seq.default(from = as.integer(tokens[2]), by = as.integer(tokens[3]), :
'from' must be a finite number
Calls: wigToRangedData -> seq -> seq.default
Execution halted

I am not sure what it means by “must be a finite number”. Would you guide me with this problem please? Thanks!

minimum command-line execution with parameter defaults

Hi all,

Now that most of the hg38 reference files are in place (thanks for adding them up), I wonder which is the minimum command-line to apply to a wig file created from an hg38 bam file without any extra knowledge about the sample. Currently, I am down to the command below which I gathered from the wiki, but I wonder if I can get rid of some of the parameters so that the default ones are picked up automatically:

$rscript $runichorcna --id $root --centromere $extdatadir/GRCh38.GCA_000001405.2_centromere_acen.txt --WIG $wigfile --includeHOMD False --estimateNormal True --estimatePloidy True --estimateScPrevalence True --scStates \"c(1,3)\" --txnE 0.9999 --txnStrength 10000 --normalPanel $extdatadir/HD_ULP_PoN_hg38_1Mb_median_normAutosome_median.rds --gcWig $extdatadir/gc_hg38_1000kb.wig --outDir $outdir

Missing datadir argument option

Dear authors,

I installed ichorCNA because I would like to run TitanCNA. Unfortunately, the snakemake file of Titcan expect that ichoCNA has some argument flags, such as "--datadir" that are missing from the script and are accepted, even if the documentation still report them as present. Could you please help me with this?

Best,
Simone

CfDNA tumor fraction threshold for ichorCNA detection

Currently, I have been using ichorCNA for cfDNA analysis in HCC. However, results of several patients showed that their tumor fraction equal to 0. Is there a theoretical threshold for ichorCNA detection power? Other samples showed fraction near 0.04-0.08.
I also read articles regarding CNV detection in cfDNA samples, with opinion showed that sequencing data with lower tumor fraction will only provide detection in larger bin size. It sounds pretty reasonable, so I am wondering if I could get the GC and mappability wig files for bin size 10m, could you please provide how these two kinds files are generated?

run ichorCNA on hg38

Hi, I met a problem when run ichorCNA on hg38 chromsomes, i set up everything is in hg38 coordinate now, but it seems that there are some problem internally when loading reads from tumor wig file:

here is the error msg:
...
Parsing: fixedStep chrom=chrY start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Correcting Tumour
Loading required package: GenomeInfoDb
Error in [[<-(*tmp*, name, value = c(-1, 0.572853, -1, 0.564709, 0.478991, :
3044 elements in value to replace 3021 elements
Calls: loadReadCountsFromWig -> $&lt;- -&gt; $&lt;- -> [[<- -> [[<-
Execution halted

incomplete ichorCNA documentation

Hey guys,

Could you please update the parameters for runichorCNA and for what instances it should be used in (similar to the parameter tuning section but more indepth)?

Thank you.

Permission denied when git repository is cloned

Hi guys,

I tried using the second option of installation, however I was denied permission in cloning the repository.

Could you please tell me how to make this work? Thank you.

Error:

Cloning into 'ichorCNA'...
The authenticity of host 'github.com (192.30.255.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How to create gc and map reference for mouse?

I am trying to use ichorCNA to analysis mouse samples. I have some control samples. So I can not use the human reference files such as gc_hg19_500kb.wig and map_hg19_500kb.wig which in the software package. How can I create or where can I find the gc and map reference for mouse?

Error when generating PoN

Hello,

While trying to generate PoN, I'm getting an error.

I have previously generated 4 normal wig files using:

$readCounter --window 50000 --quality 20 --chromosome "chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY" $normal_sample.bam > $normal_sample.wig

Wig files have correct format:

fixedStep chrom=chr1 start=1 step=50000 span=50000
5
47
31

The actual command line for the PoN generation:

Rscript /rdseqdata/bin/ichorCNA-master/scripts/createPanelOfNormals.R
--filelist /rndhome/akoch/SamBam_file_example/TMP/ref/wigPoNfiles.txt
--gcWig /rdseqdata/bin/ichorCNA-master/inst/extdata/gc_hg19_50kb.wig
--mapWig /rdseqdata/bin/ichorCNA-master/inst/extdata/map_hg19_50kb.wig
--centromere /rdseqdata/bin/ichorCNA-master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt
--outfile /rdseqdata/bin/ichorCNA-master/inst/extdata/PoN_hg19_50Kb_median_normAutosome_median.rds

The output before blowup:

Loading normal file:/rndhome/akoch/SamBam_file_example/TMP/ref/1801100551-NIK-3-26_TCATCTCC_L003_R1_export.wig
Slurping: /rndhome/akoch/SamBam_file_example/TMP/ref/1801100551-NIK-3-26_TCATCTCC_L003_R1_export.wig
Parsing: fixedStep chrom=chr1 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr2 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr3 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr4 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr5 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr6 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr7 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr8 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr9 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr10 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr11 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr12 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr13 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr14 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr15 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr16 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr17 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr18 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr19 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr20 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr21 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chr22 start=1 step=50000 span=50000
Parsing: fixedStep chrom=chrX start=1 step=50000 span=50000
Parsing: fixedStep chrom=chrY start=1 step=50000 span=50000
Sorting by decreasing chromosome size
Reading GC and mappability files
Slurping: /rdseqdata/bin/ichorCNA-master/inst/extdata/gc_hg19_50kb.wig
Parsing: fixedStep chrom=1 start=1 step=50000 span=50000
Error in seq.default(from = as.integer(tokens[2]), by = as.integer(tokens[3]), :
'from' must be a finite number
Calls: wigToRangedData -> seq -> seq.default
Execution halted

Any help is greatly appreciated!

Andrey

HMMcopy is not available for ichorCNA

Hi Gavin,

While installing ichorCNA on Windows desktop using recommended option (from github repo), I'm getting an error of HMMcopy being anavailable. I know that ichorCNA has HMMcopy as its part and the functionality is different from the stand-alone HMMcopy, so I made sure to delete it before installing ichorCNA. The error message I'm getting is below. I would appreciate any help in fixing this issue!

Best,
Andrey


Andrey Koch, PhD
Data Scientist, Bioinformatics
LabCorp, Integrated genetics
San Diego, CA
858-202-9466
[email protected]

install_github("broadinstitute/ichorCNA")
Downloading GitHub repo broadinstitute/ichorCNA@master
from URL https://api.github.com/repos/broadinstitute/ichorCNA/zipball/master
Installing ichorCNA
"C:/PROGRA1/R/R-341.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/akoch/AppData/Local/Temp/RtmpiGWecG/devtools3888c974b6/broadinstitute-ichorCNA-92c8bd1"
--library="C:/Users/akoch/Documents/R/win-library/3.4" --install-tests

ERROR: dependency 'HMMcopy' is not available for package 'ichorCNA'

  • removing 'C:/Users/akoch/Documents/R/win-library/3.4/ichorCNA'
    Installation failed: Command failed (1)

could not find symbol "recursive" in environment of the generic function

Hi @gavinha ,
i am getting this error:
/gpfs/users/yanghao/software/anaconda2/bin/Rscript /gpfs/users/yanghao/software/ichorCNA/scripts/runIchorCNA.R --id 18b0568FF.T --WIG results/readDepth/18b0568FF.T.bin1000000.wig --gcWig /gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_1000kb.wig --mapWig /gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_1000kb.wig --NORMWIG results/readDepth/18b0558D1.N.bin1000000.wig --ploidy "c(2,3)" --normal "c(0.5)" --maxCN 8 --includeHOMD False --chrs "c(1:22, "X")" --chrTrain "c(1:22)" --estimateNormal True --estimatePloidy True --estimateScPrevalence True --scStates "c(1,3)" --centromere None --exons.bed None --txnE 0.9999 --txnStrength 10000 --fracReadsInChrYForMale 0.001 --plotFileType png --plotYLim "c(-2,4)" --outDir results/ichorCNA/18b0568FF.T/

$WIG
[1] "results/readDepth/18b0568FF.T.bin1000000.wig"

$NORMWIG
[1] "results/readDepth/18b0558D1.N.bin1000000.wig"

$gcWig
[1] "/gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_1000kb.wig"

$mapWig
[1] "/gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_1000kb.wig"

$exons.bed
[1] "None"

$id
[1] "18b0568FF.T"

$centromere
[1] "None"

$rmCentromereFlankLength
[1] 1e+05

$normal
[1] "c(0.5)"

$scStates
[1] "c(1,3)"

$lambda
[1] "NULL"

$lambdaScaleHyperParam
[1] 3

$ploidy
[1] "c(2,3)"

$maxCN
[1] 8

$estimateNormal
[1] TRUE

$estimateScPrevalence
[1] TRUE

$estimatePloidy
[1] TRUE

$maxFracCNASubclone
[1] 0.7

$maxFracGenomeSubclone
[1] 0.5

$minSegmentBins
[1] 50

$altFracThreshold
[1] 0.05

$chrNormalize
[1] "c(1:22)"

$chrTrain
[1] "c(1:22)"

$chrs
[1] "c(1:22, "X")"

$normalizeMaleX
[1] TRUE

$fracReadsInChrYForMale
[1] 0.001

$includeHOMD
[1] FALSE

$txnE
[1] 0.9999

$txnStrength
[1] 10000

$plotFileType
[1] "png"

$plotYLim
[1] "c(-2,4)"

$outDir
[1] "results/ichorCNA/18b0568FF.T/"

$help
[1] FALSE

Loading required package: IRanges
Loading required package: methods
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

anyDuplicated, append, as.data.frame, basename, cbind, colMeans,
colnames, colSums, dirname, do.call, duplicated, eval, evalq,
Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, Position, rank, rbind, Reduce, rowMeans, rownames,
rowSums, sapply, setdiff, sort, table, tapply, union, unique,
unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

expand.grid

Loading required package: geneplotter
Loading required package: Biobase
Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: lattice
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: XML

Attaching package: ‘ichorCNA’

The following object is masked from ‘package:HMMcopy’:

HMMsegment

Loading tumour file:18b0568FF.T
Slurping: results/readDepth/18b0568FF.T.bin1000000.wig
Parsing: fixedStep chrom=1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=9 start=1 step=1000000 span=1000000


Parsing: fixedStep chrom=10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=22 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=X start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=Y start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Reading GC and mappability files
Slurping: /gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_1000kb.wig
Parsing: fixedStep chrom=1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=9 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=22 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=X start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=Y start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Slurping: /gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_1000kb.wig
Parsing: fixedStep chrom=1 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=2 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=3 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=4 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=5 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=6 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=7 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=8 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=9 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=10 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=11 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=12 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=13 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=14 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=15 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=16 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=17 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=18 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=19 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=20 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=21 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=22 start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=X start=1 step=1000000 span=1000000
Parsing: fixedStep chrom=Y start=1 step=1000000 span=1000000
Sorting by decreasing chromosome size
Correcting Tumour
Loading required package: GenomeInfoDb
Error in c(x, value) :
could not find symbol "recursive" in environment of the generic function
Calls: loadReadCountsFromWig ... setListElement -> .append_list_element -> coerce2 -> coerce2 -> c
Execution halted

tumor bam depth is :1048
and normal bam depth is :168
target panel is around 1M+

Thanks.

Reference genome with the prefix 'chr'

Gavin,

I took a look at some of the data sets in ichorCNA and found out that chromosome names are numeric (without the prefix 'chr')
I am wondering if ichorCNA can deal with bam generated with hg19 with the prefix 'chr'

Please let me know.

Thanks,
Joon

Creating custom panel of normals

Provide R script to create a custom panel of normals (PoN) that is specific to the study. These normal samples should be processed similarly to the tumor samples in the study.

The benefits of using the PoN is to correct for systematic biases that were not already corrected via GC-content correction. For analysis with out matched normal, this can provide some improvement in the corrected coverage data. However, normalization using the matched normal sample, which preferably has had data generation steps performed similarly to the tumor sample, is still likely better for correcting biases.

Here is where the normal panel normalization is used in the main R script:

## NORMALIZE GENOME-WIDE BY MATCHED NORMAL OR NORMAL PANEL (MEDIAN) ##
tumour_copy[[id]] <- normalizeByPanelOrMatchedNormal(tumour_copy[[id]], chrs = c(1:22, "X", "Y"),
normal_panel = normal_panel, normal_copy = normal_copy,
gender = gender$gender, normalizeMaleX = normalizeMaleX)

Error in `[[<-`(`*tmp*`, name, value = c(-1, -1, 0.598332, 0.539498, 0.594508, :

Hello,i'm using ichorCNA in TitanCNA snakemake pipeline,my command is
Rscript /gpfs/users/yanghao/software/ichorCNA/scripts/runIchorCNA.R --id tumor_sample_1 --WIG results/readDepth/tumor_sample_1.bin10000.wig --gcWig /gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_500kb.wig --mapWig /gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_500kb.wig --NORMWIG results/readDepth/normal_sample_1.bin10000.wig --ploidy "c(2,3)" --normal "c(0.5)" --maxCN 8 --includeHOMD False --chrs "c(1:22, \"X\")" --chrTrain "c(1:22)" --estimateNormal True --estimatePloidy True --estimateScPrevalence True --scStates "c(1,3)" --centromere /gpfs/users/yanghao/software/ichorCNA/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt --txnE 0.9999 --txnStrength 10000 --fracReadsInChrYForMale 0.001 --plotFileType png --plotYLim "c(-2,4)" --outDir results/ichorCNA/tumor_sample_1/
and output log:

$WIG
[1] "results/readDepth/tumor_sample_1.bin10000.wig"

$NORMWIG
[1] "results/readDepth/normal_sample_1.bin10000.wig"

$gcWig
[1] "/gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_500kb.wig"

$mapWig
[1] "/gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_500kb.wig"

$id
[1] "tumor_sample_1"

$centromere
[1] "/gpfs/users/yanghao/software/ichorCNA/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt"

$rmCentromereFlankLength
[1] 1e+05

$normal
[1] "c(0.5)"

$scStates
[1] "c(1,3)"

$lambda
[1] "NULL"

$lambdaScaleHyperParam
[1] 3

$ploidy
[1] "c(2,3)"

$maxCN
[1] 8

$estimateNormal
[1] TRUE

$estimateScPrevalence
[1] TRUE

$estimatePloidy
[1] TRUE

$maxFracCNASubclone
[1] 0.7

$maxFracGenomeSubclone
[1] 0.5

$minSegmentBins
[1] 50

$altFracThreshold
[1] 0.05

$chrNormalize
[1] "c(1:22)"

$chrTrain
[1] "c(1:22)"

$chrs
[1] "c(1:22, "X")"

$normalizeMaleX
[1] TRUE

$fracReadsInChrYForMale
[1] 0.001

$includeHOMD
[1] FALSE

$txnE
[1] 0.9999

$txnStrength
[1] 10000

$plotFileType
[1] "png"

$plotYLim
[1] "c(-2,4)"

$outDir
[1] "results/ichorCNA/tumor_sample_1/"

$help
[1] FALSE

Loading required package: IRanges
Loading required package: methods
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

anyDuplicated, append, as.data.frame, cbind, colMeans, colnames,
colSums, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match,
mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rowMeans, rownames, rowSums, sapply, setdiff, sort,
table, tapply, union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: ‘S4Vectors’

The following object is masked from ‘package:base’:

expand.grid

Loading required package: geneplotter
Loading required package: Biobase
Welcome to Bioconductor

Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: lattice
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: XML

Attaching package: ‘ichorCNA’

The following object is masked from ‘package:HMMcopy’:

HMMsegment

Loading tumour file:tumor_sample_1
Slurping: results/readDepth/tumor_sample_1.bin10000.wig
Parsing: fixedStep chrom=1 start=1 step=10000 span=10000
Parsing: fixedStep chrom=2 start=1 step=10000 span=10000
Parsing: fixedStep chrom=3 start=1 step=10000 span=10000
Parsing: fixedStep chrom=4 start=1 step=10000 span=10000
Parsing: fixedStep chrom=5 start=1 step=10000 span=10000
Parsing: fixedStep chrom=6 start=1 step=10000 span=10000
Parsing: fixedStep chrom=7 start=1 step=10000 span=10000
Parsing: fixedStep chrom=8 start=1 step=10000 span=10000
Parsing: fixedStep chrom=9 start=1 step=10000 span=10000
Parsing: fixedStep chrom=10 start=1 step=10000 span=10000
Parsing: fixedStep chrom=11 start=1 step=10000 span=10000
Parsing: fixedStep chrom=12 start=1 step=10000 span=10000
Parsing: fixedStep chrom=13 start=1 step=10000 span=10000
Parsing: fixedStep chrom=14 start=1 step=10000 span=10000
Parsing: fixedStep chrom=15 start=1 step=10000 span=10000
Parsing: fixedStep chrom=16 start=1 step=10000 span=10000
Parsing: fixedStep chrom=17 start=1 step=10000 span=10000
Parsing: fixedStep chrom=18 start=1 step=10000 span=10000
Parsing: fixedStep chrom=19 start=1 step=10000 span=10000
Parsing: fixedStep chrom=20 start=1 step=10000 span=10000
Parsing: fixedStep chrom=21 start=1 step=10000 span=10000
Parsing: fixedStep chrom=22 start=1 step=10000 span=10000
Parsing: fixedStep chrom=X start=1 step=10000 span=10000
Parsing: fixedStep chrom=Y start=1 step=10000 span=10000
Sorting by decreasing chromosome size
Reading GC and mappability files
Slurping: /gpfs/users/yanghao/software/ichorCNA/inst/extdata/gc_hg19_500kb.wig
Parsing: fixedStep chrom=1 start=1 step=500000 span=500000
Parsing: fixedStep chrom=2 start=1 step=500000 span=500000
Parsing: fixedStep chrom=3 start=1 step=500000 span=500000
Parsing: fixedStep chrom=4 start=1 step=500000 span=500000
Parsing: fixedStep chrom=5 start=1 step=500000 span=500000
Parsing: fixedStep chrom=6 start=1 step=500000 span=500000
Parsing: fixedStep chrom=7 start=1 step=500000 span=500000
Parsing: fixedStep chrom=8 start=1 step=500000 span=500000
Parsing: fixedStep chrom=9 start=1 step=500000 span=500000
Parsing: fixedStep chrom=10 start=1 step=500000 span=500000
Parsing: fixedStep chrom=11 start=1 step=500000 span=500000
Parsing: fixedStep chrom=12 start=1 step=500000 span=500000
Parsing: fixedStep chrom=13 start=1 step=500000 span=500000
Parsing: fixedStep chrom=14 start=1 step=500000 span=500000
Parsing: fixedStep chrom=15 start=1 step=500000 span=500000
Parsing: fixedStep chrom=16 start=1 step=500000 span=500000
Parsing: fixedStep chrom=17 start=1 step=500000 span=500000
Parsing: fixedStep chrom=18 start=1 step=500000 span=500000
Parsing: fixedStep chrom=19 start=1 step=500000 span=500000
Parsing: fixedStep chrom=20 start=1 step=500000 span=500000
Parsing: fixedStep chrom=21 start=1 step=500000 span=500000
Parsing: fixedStep chrom=22 start=1 step=500000 span=500000
Parsing: fixedStep chrom=X start=1 step=500000 span=500000
Parsing: fixedStep chrom=Y start=1 step=500000 span=500000
Sorting by decreasing chromosome size
Slurping: /gpfs/users/yanghao/software/ichorCNA/inst/extdata/map_hg19_500kb.wig
Parsing: fixedStep chrom=1 start=1 step=500000 span=500000
Parsing: fixedStep chrom=2 start=1 step=500000 span=500000
Parsing: fixedStep chrom=3 start=1 step=500000 span=500000
Parsing: fixedStep chrom=4 start=1 step=500000 span=500000
Parsing: fixedStep chrom=5 start=1 step=500000 span=500000
Parsing: fixedStep chrom=6 start=1 step=500000 span=500000
Parsing: fixedStep chrom=7 start=1 step=500000 span=500000
Parsing: fixedStep chrom=8 start=1 step=500000 span=500000
Parsing: fixedStep chrom=9 start=1 step=500000 span=500000
Parsing: fixedStep chrom=10 start=1 step=500000 span=500000
Parsing: fixedStep chrom=11 start=1 step=500000 span=500000
Parsing: fixedStep chrom=12 start=1 step=500000 span=500000
Parsing: fixedStep chrom=13 start=1 step=500000 span=500000
Parsing: fixedStep chrom=14 start=1 step=500000 span=500000
Parsing: fixedStep chrom=15 start=1 step=500000 span=500000
Parsing: fixedStep chrom=16 start=1 step=500000 span=500000
Parsing: fixedStep chrom=17 start=1 step=500000 span=500000
Parsing: fixedStep chrom=18 start=1 step=500000 span=500000
Parsing: fixedStep chrom=19 start=1 step=500000 span=500000
Parsing: fixedStep chrom=20 start=1 step=500000 span=500000
Parsing: fixedStep chrom=21 start=1 step=500000 span=500000
Parsing: fixedStep chrom=22 start=1 step=500000 span=500000
Parsing: fixedStep chrom=X start=1 step=500000 span=500000
Parsing: fixedStep chrom=Y start=1 step=500000 span=500000
Sorting by decreasing chromosome size
Correcting Tumour
Loading required package: GenomeInfoDb
Error in [[<-(*tmp*, name, value = c(-1, -1, 0.598332, 0.539498, 0.594508, :
6087 elements in value to replace 303641 elements
Calls: loadReadCountsFromWig -> $&lt;- -&gt; $&lt;- -> [[<- -> [[<-
Execution halted

Here is my input wig files:
Tumor:https://github.com/haoziyeung/supp_files/blob/master/tumor_sample_1.bin10000.wig
Normal:https://github.com/haoziyeung/supp_files/blob/master/normal_sample_1.bin10000.wig
Thanks a lot.

Bug in plotting.R

There is a bug in plotting.R that causes the runIchorCNA.R script to fail.
Offending call is on line 263
plotChrLines(dataIn[,"chr"],coordEnd$chrBkpt,yrange)
coordEnd isn't set unless it goes through the if condition on line 237.
Fix is to add an extra line after line 227
coord <- getGenomeWidePositions(dataIn[,"chr"],dataIn[,"end"]) # existing line
coordEnd <- getGenomeWidePositions(dataIn[,"chr"],dataIn[,"end"]) # Added line

HMMcopy output format/version?

Hi there -- I'm hitting a problem loading files produced by HMMcopy readCounter with ichor.

It seems like ichor is looking for a wiggle file with 3 columns (reads, gc, map), but the version of HMMcopy readCounter I'm using is only producing a wiggle file with one column (presumably reads).

The readCounter I'm using is the one distributed in HMMcopy bin/readCounter with HMMcopy v0.1.1 from http://compbio-bccrc.sites.olt.ubc.ca/files/2013/12/HMMcopy.zip. I tried using both the pre-compiled distributed binary, as well as recompiling readCounter from source, but both produce the same output.

I'm running readCounter as described in the ichor docs (though with different chrom names to match the assembly I'm using):

bin/readCounter --window 1000000 --quality 20 \
--chromosome "chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX" \
/path/to/my.bam > /path/to/my.wig

And this is the error I see when running ichor with the wiggle file from readCounter:

[...]
Correcting Tumour
Loading required package: GenomeInfoDb
Removed 0 bins near centromeres.
Error in correctReadCounts(counts, chrNormalize = chrNormalize) :
  Missing one of required columns: reads, gc, map
Calls: loadReadCountsFromWig -> correctReadCounts
Execution halted

(looks like it's being raised here).

I've attached the wiggle file output from readCounter here, and also copied the first few lines below:

fixedStep chrom=chr1 start=1 step=1000000 span=1000000
26283
66885
77638
71066
94216

I'm wondering if perhaps I'm using the wrong version of HMMcopy?

Negative log2ratios are called GAIN

Looking through a rather "unusual" sample (a cell line mixture, used to do preliminary evaluation of this program) I noticed that many negative ratios are called GAIN:

6       28500001        29000000        3       GAIN    -8.7995 0

This is inconsistent with the actual log2ratio value.

Correct integer copy number for high-level events and for chrX (males)

Include feature to correct integer copy number for two purposes:

  1. High-level copy number events higher than maxCN state.
    This will help to adjust absolute integer copy number beyond the modeled copy number states.
  2. Adjust chrX integer copy number results for males.
    ChrX for males have a baseline of 1 copy and the results do not reflect this in the absolute copy number predictions reported.

This also address issue #28

I will use a nearly identical method recently added to TitanCNA. See the invocation and function declaration for reference.

https://github.com/gavinha/TitanCNA/blob/49081fb7334ce7b5988c52b6eb9953dfe2743d1f/scripts/R_scripts/titanCNA.R#L271-L272

https://github.com/gavinha/TitanCNA/blob/49081fb7334ce7b5988c52b6eb9953dfe2743d1f/R/utils.R#L1168-L1169

shotgun sequencing Data compatibility

Hi,
We have sequenced data (from Ion Torrent) for Low-pass shotgun sequencing. Is shotgun sequencing data compatibility to run ichorCNA to estimate the tumor fractionas as well as copy number identification.
If yes, can you please guide me how to create a baseline and how many normal (healthy) samples are required for the same.

Regards
Krunal

custom parameters for 30x WGS TitanCNA analysis

Hi,

I am trying running TitanCNA snakemake workflow on 30X paired tumor/normal whole genomes. I see following parameters set for 0.1x genome and optional 1x genome. For 30x genome, would you have recommended parameters or suggestions that I can check and use in my trial runs. I am reading both, TitanCNA and ichoCNA manuscripts to get more idea on how to these parameters can be adjusted for WGS.

######## CUSTOM PARAMETER SETTINGS #########
############################################
# 0.1x cfDNA #
if (is.null(lambda)){
logR.var <- 1 / ((apply(logR, 2, sd, na.rm = TRUE) / sqrt(length(param$ct))) ^ 2)
param$lambda <- rep(logR.var, length(param$ct))
param$lambda[param$ct %in% c(2)] <- logR.var
param$lambda[param$ct %in% c(1,3)] <- logR.var
param$lambda[param$ct >= 4] <- logR.var / 5
param$lambda[param$ct == max(param$ct)] <- logR.var / 15
param$lambda[param$ct.sc.status] <- logR.var / 10
}else{
param$lambda[param$ct %in% c(2)] <- lambda[2]
param$lambda[param$ct %in% c(1)] <- lambda[1]
param$lambda[param$ct %in% c(3)] <- lambda[3]
param$lambda[param$ct >= 4] <- lambda[4]
param$lambda[param$ct == max(param$ct)] <- lambda[2] / 15
param$lambda[param$ct.sc.status] <- lambda[2] / 10
}
param$alphaLambda <- rep(lambdaScaleHyperParam, length(param$ct))
# 1x bulk tumors #
#param$lambda[param$ct %in% c(2)] <- 2000
#param$lambda[param$ct %in% c(1)] <- 1750
#param$lambda[param$ct %in% c(3)] <- 1750
#param$lambda[param$ct >= 4] <- 1500
#param$lambda[param$ct == max(param$ct)] <- 1000 / 25
#param$lambda[param$ct.sc.status] <- 1000 / 75
#param$alphaLambda[param$ct.sc.status] <- 4
#param$alphaLambda[param$ct %in% c(1,3)] <- 5
#param$alphaLambda[param$ct %in% c(2)] <- 5
#param$alphaLambda[param$ct == max(param$ct)] <- 4

Thanks,
Samir

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

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.

Panel of Normal Documentation Incomplete

Hey guys,

Could you please let me know what each parameter means for createPanelOfNormals.R? Thank you.

Rscript createPanelOfNormals.R
--filelist /path/to/wig_files.txt
--gcWig /path/to/gc.wig --mapWig /path/to/map.wig
--centromere /path/to/centromeres_file.txt
--outfile base_outfile_name

gender determination

hi,

The ichorCNA determines that the gender of a sample is female, in fact, the sample is female,my shell is:

Rscript /PUBLIC/software/CANCER/Software/R/R3.4.0/lib64/R/library/ichorCNA/scripts/runIchorCNA.R \
	--id P10413356170719 \
	--WIG P10413356170719.final.wig \
	--ploidy "c(2,3)" --normal "c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9)" --maxCN 5 \
	--gcWig /PUBLIC/software/CANCER/Software/R/R3.4.0/lib64/R/library/ichorCNA/extdata/gc_hg19_500kb.wig \
	--mapWig /PUBLIC/software/CANCER/Software/R/R3.4.0/lib64/R/library/ichorCNA/extdata/map_hg19_500kb.wig \
	--centromere /PUBLIC/software/CANCER/Software/R/R3.4.0/lib64/R/library/ichorCNA/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt \
	--normalPanel /PUBLIC/software/CANCER/Software/R/R3.4.0/lib64/R/library/ichorCNA/extdata/HD_ULP_PoN_500kb_median_normAutosome_mapScoreFiltered_median.rds \
	--includeHOMD True --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

What parameters can I adjust?

thanks ~
Maggie
P10413356170719.final.wig.txt

Qustions about bins size and coverage

I am sorry to ask some basic questions:

  1. Is there some information about the sample coverage report? I found the parameter file from the output file but coverage value is NA. What's the meaning of that? I have tried different bin sizes (10kb,50kb,500kb,1mb) and got the same result. I use another R package "pasillaBamSubset" got the coverage of my sample is around 0.5.
  2. I don't know which bins size should I choose. Because for different bins sizes, it reported different tumor fraction. (10kb-0.27,50kb-0.15,500kb-0.12,1mb-0.05)
    Thanks for your reading and reply.

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

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!

Update release after bugfix?

The github page has a release 0.1.0 but this is misleading when this is not updated. For example #8, #24 should warrant a new release. Please remove your releases or update them.

Also please consider to add #33 (PR #38) to the installation.

ichorCNA copy number ratio in the cna.seg file differs from the genome wide plot

Hi,
When there is no normal wig supplied, the minimum log2 ratio is going upto -6 in cna.seg file but that value is not showing up in the plots. Is there any limitation in the plots shown (-2 to 2) ?
Also, when I run including a normal wig, then the tumor fractions change a lot. Eg. for one sample it changed from 0.3 to 0. Please comment on this.
Thanks,
Manasa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.