-
Notifications
You must be signed in to change notification settings - Fork 89
Usage
There are 2 main steps in the analysis workflow:
- Generating read count coverage information using
readCounter
from the HMMcopy suite. - Copy number analysis and prediction of tumor fraction using ichorCNA R package.
The analysis workflow has also been written into a Snakemake Workflow
To create a WIG file from a ULP-WGS BAM, use HMMcopy's readCounter
. This example would create a WIG file with 1Mb bins across all chromosomes and only include reads with a mapping quality greater than 20.
Note: The BAM file must be indexed and the index file must have the extension .bam.bai
. The index file should be located in the same directory as the BAM file.
/path/to/HMMcopy/bin/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" \
/path/to/tumor.bam > /path/to/tumor.wig
The easiest way to manually run ichorCNA is to use runIchorCNA.R
provided in the ichorCNA/scripts/
directory.
Here is an example of how to launch the R script from the command line:
Rscript /path/to/ichorCNA/scripts/runIchorCNA.R --id tumor_sample \
--WIG /path/to/tumor.wig --ploidy "c(2,3)" --normal "c(0.5,0.6,0.7,0.8,0.9)" --maxCN 5 \
--gcWig /path/to/ichorCNA/inst/extdata/gc_hg19_1000kb.wig \
--mapWig /path/to/ichorCNA/inst/extdata/map_hg19_1000kb.wig \
--centromere /path/to/ichorCNA/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt \
--normalPanel /path/to/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 ./
Invoking the --help
flag will print out the list of options to use. Here, we will briefly describe some of the key arguments to consider.
Rscript runIchorCNA.R --help
Usage: runIchorCNA.R [options]
Options:
--WIG=WIG
Path to tumor WIG file. Required.
--NORMWIG=NORMWIG
Path to normal WIG file. Default: [NULL]
--gcWig=GCWIG
Path to GC-content WIG file; Required
--mapWig=MAPWIG
Path to mappability score WIG file. Default: [NULL]
--normalPanel=NORMALPANEL
Median corrected depth from panel of normals. Default: [NULL]
--exons.bed=EXONS.BED
Path to bed file containing exon regions. Default: [NULL]
--id=ID
Patient ID. Default: [test]
--centromere=CENTROMERE
File containing Centromere locations; if not provided then will use hg19 version from ichorCNA package. Default: [NULL]
--rmCentromereFlankLength=RMCENTROMEREFLANKLENGTH
Length of region flanking centromere to remove. Default: [1e+05]
--normal=NORMAL
Initial normal contamination; can be more than one value if additional normal initializations are desired. Default: [0.5]
--scStates=SCSTATES
Subclonal states to consider. Default: [NULL]
--coverage=COVERAGE
PICARD sequencing coverage. Default: [NULL]
--lambda=LAMBDA
Initial Student's t precision; must contain 4 values (e.g. c(1500,1500,1500,1500)); if not provided then will automatically use based on variance of data. Default: [NULL]
--lambdaScaleHyperParam=LAMBDASCALEHYPERPARAM
Hyperparameter (scale) for Gamma prior on Student's-t precision. Default: [3]
--ploidy=PLOIDY
Initial tumour ploidy; can be more than one value if additional ploidy initializations are desired. Default: [2]
--maxCN=MAXCN
Total clonal CN states. Default: [7]
--estimateNormal=ESTIMATENORMAL
Estimate normal. Default: [TRUE]
--estimateScPrevalence=ESTIMATESCPREVALENCE
Estimate subclonal prevalence. Default: [TRUE]
--estimatePloidy=ESTIMATEPLOIDY
Estimate tumour ploidy. Default: [TRUE]
--maxFracCNASubclone=MAXFRACCNASUBCLONE
Exclude solutions with fraction of subclonal events greater than this value. Default: [0.7]
--maxFracGenomeSubclone=MAXFRACGENOMESUBCLONE
Exclude solutions with subclonal genome fraction greater than this value. Default: [0.5]
--minSegmentBins=MINSEGMENTBINS
Minimum number of bins for largest segment threshold required to estimate tumor fraction; if below this threshold, then will be assigned zero tumor fraction.
--altFracThreshold=ALTFRACTHRESHOLD
Minimum proportion of bins altered required to estimate tumor fraction; if below this threshold, then will be assigned zero tumor fraction. Default: [0.05]
--chrNormalize=CHRNORMALIZE
Specify chromosomes to normalize GC/mappability biases. Default: [c(1:22)]
--chrTrain=CHRTRAIN
Specify chromosomes to estimate params. Default: [c(1:22)]
--chrs=CHRS
Specify chromosomes to analyze. Default: [c(1:22,"X")]
--normalizeMaleX=NORMALIZEMALEX
If male, then normalize chrX by median. Default: [TRUE]
--fracReadsInChrYForMale=FRACREADSINCHRYFORMALE
Threshold for fraction of reads in chrY to assign as male. Default: [0.001]
--includeHOMD=INCLUDEHOMD
If FALSE, then exclude HOMD state. Useful when using large bins (e.g. 1Mb). Default: [FALSE]
--txnE=TXNE
Self-transition probability. Increase to decrease number of segments. Default: [0.9999999]
--txnStrength=TXNSTRENGTH
Transition pseudo-counts. Exponent should be the same as the number of decimal places of --txnE. Default: [1e+07]
--plotFileType=PLOTFILETYPE
File format for output plots. Default: [pdf]
--plotYLim=PLOTYLIM
ylim to use for chromosome plots. Default: [c(-2,2)]
--outDir=OUTDIR
Output Directory. Default: [./]
--libdir=LIBDIR
Script library path. Usually exclude this argument unless custom modifications have been made to the ichorCNA R package code and the user would like to source those R files. Default: [NULL]