ichorCNA
ichorCNA copied to clipboard
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
Hi @JJMaggie
The sample should be male?
Here is the argument you can use to tweak the setting for gender determination. https://github.com/broadinstitute/ichorCNA/blob/8021afa5b72f34e8fce3c30efe0bcae9f735122d/scripts/runIchorCNA.R#L47
This argument specifies the minimum proportion of reads aligned to chrY (relative to all reads) that indicates the sample should be male. You can check the params.txt file to see what this proportion is for your sample as well as other samples to get a sense of cut-off to use.
Hope this helps. Gavin
hi, Gavin
I am sorry for such a long time without feedback.
yes, this sample should be male, and the ChrY coverage fraction of this sample is 0.001975. Other male samples are lager than 0.2. I specify --fracReadsInChrYForMale 0.0001 for this sample, and I also tweaked the argument for others samples, but it doesn't work, and there is no change in the results. Where is the problems?
thanks ~ Maggie
hi, Gavin
ichorCNA/scripts/runIchorCNA.R
Line 166 loadReadCountsFromWig function
function (counts, chrs = c(1:22, "X", "Y"), gc = NULL, map = NULL,centromere = NULL, flankLength= 1e+05, targetedSequences = NULL,genomeStyle = "NCBI", applyCorrection = TRUE, mapScoreThres = 0.9,chrNormalize = c(1:22, "X", "Y"), fracReadsInChrYForMale = 0.002,useChrY = TRUE)
I think the problem is here fracReadsInChrYForMale = 0.002 ?
thanks ~ Maggie
On this topic, Is there any scope to manually specify the gender of the reference samples used to make the PoN and the tumour samples I'd like to run against it? I'm running prostate cancer cases (all-male) against an all-male reference set so I'd prefer if ichorCNA doesn't try to guess gender - several have been marked as females, due to somatic copy number alterations present on the X-chromosome.
Hi @seedgeorge
We still need to add this flexibility to the R script but for now you can make some minor adjustments to hardcode the sex/gender.
Here are the relevant lines (untested) https://github.com/broadinstitute/ichorCNA/blob/1d54a1fd4d8bd88aa0217791482be65bfe599db5/scripts/runIchorCNA.R#L178
You can set change this to
gender <- list(gender="male")
If you do not have a matched normal sample, then this is probably the only change you need to make.
If you do have matched normal sample, the script will try to match the gender for both tumor and normal and if there is a mismatch, it will take the gender predicted from the normal.
If you are using a PoN, then it will already account for male samples.
Give this a try and let me know if this works.
Important: For males, the resulting copy number prediction in chrX should be interpreted slightly differently than for females. That is, the assumed baseline of chrX should be 1 copy and the predicted copy number should be relative to this. However, at the moment, the output results do not reflect this and a correction needs to be applied. I will create a new issue and add this feature.
You are correct that at the moment, chrX is included in the determination of gender such that median log ratio of chrX needs to be < -0.5 AND chrY coverage needs to meet some threshold. I can eliminate the chrX criteria because somatic copy number events can occur.
Hope this helps.
Best, Gavin
Hi Gavin, this seems to have resolved my issue! Thanks, George