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

Display ChrY in plots #65

Open Haldrup opened 4 years ago

Haldrup commented 4 years ago

Sorry for asking a basic question.

I am working with Prostate Cancer (males only) and we´re unable to display the Y chromosome in the output plots. I´ve tried to mess around with the --chrs "c(1:22, \"X\")" and --chrTrain "c(1:22)" functions - but no success. Any advice?

Thanks in advance

Jakob

CuriusScientist commented 4 years ago

Apologies for hijacking the conversation but I think my problem is very related to Jacobs so it will be good if I don't make unnecessary duplicates of the same.

While using --chrs "c(1:22, \"X\")" with --chrTrain "c(1:22)", everything works fine and I get gender determination as Female, which is correct.

But like Jakob, I wish to plot Y chromosome in the plots and thus I tried using --chrs "c(1:22, \"Y\")" with --chrTrain "c(1:22)" which according to the definition of "--chrs=CHRS Specify chromosomes to analyze. Default: [c(1:22,"X")]|" should have been fine but I got following error

determining gender ... Gender Unknown Error in keepSeqlevels(tumour_reads, chrs, pruning.mode ="coarse") : invalid seqlevels: Y In addition: Warning Message: In regularize.values(x, y, ties, missing(ties)): collapsing to unique 'x' values Execution halted

Then, I tried following combinations: --chrs "c(1:22, \"Y\")" with --chrTrain "c(1:22,\"X\")" --chrs "c(1:22, \"Y\")" with --chrTrain "c(1:22,\"Y\")" --chrs "c(1:22, \"Y\")" with --chrTrain "c(1:22,\"X\", \"Y\")" and got the same error as above

which brings me to wonder the usage of --chrs and --chrTrain and what will happen if I change the options for --chrTrain

Haldrup commented 4 years ago

Hi CuriusScientist,

I have tried the same combinations as you and I get identical errors. In addition, I tried to specify the gender manually although the software correctly identified every sample as men - but without any succes.

I noticed the authors did not display the chromosome Y in the seminal paper (also prostate cancer). Thus, im unsure if its possible at all? If not, I would appreciate if someone can provide the rationale for this?

Thanks in advance,

Jakob

gavinha commented 4 years ago

Hi @Haldrup @CuriusScientist

Specifying chrY in --chrs should be the way to do it but I haven't tested it. I'll try to look into this.

Best, Gavin

CuriusScientist commented 4 years ago

@gavinha any updates on this?

xin8you commented 3 years ago

Applying filter on data... Correcting for GC bias... Correcting for mappability bias... Filtering low uniqueness regions with mappability score < 0.75 Removed 321 bins near centromeres. Determining gender...Gender male Error in keepSeqlevels(tumour_reads, chrs, pruning.mode = "coarse") : invalid seqlevels: Y Calls: normalizeByPanelOrMatchedNormal -> keepChr -> keepSeqlevels In addition: Warning message: In regularize.values(x, y, ties, missing(ties)) : collapsing to unique 'x' values Execution halted

I also have this problem! my cmd is : --chrs "c(1:22, \"X\", \"Y\")" --chrTrain "c(1:22)" --fracReadsInChrYForMale 0.001

gavinha commented 3 years ago

Hi @xin8you

The reason it's failing for you is because the panel of normal you're using does not contain data for chrY and thus incompatible with the analysis of chrY.

You may check out this version of ichorCNA for some improvements for sex estimation: https://github.com/GavinHaLab/ichorCNA

Best, Gavin

xin8you commented 3 years ago

Hi @gavinha

Thanks for your help, I have solved this issue, and I have an other question: Whether an male sample have X copy = 2 (blue), Y copy = 3 (brown) means X is haploidy and Y gain a copy ?

I will test for your https://github.com/GavinHaLab/ichorCNA later, and What have you optimized?

Best, Xin

ilykos commented 9 months ago

@xin8you Hi Xin, could you elaborate on what the problem was and how you fixed it? I have hardcoded gender, updated the extdata files, but the invalid seqlevels error persists.

xin8you commented 9 months ago

@ilykos Hi ilykos: Build your PON with your own data containing men, and your PON contains only women

Best!

petaleaf commented 2 weeks ago

When using the createPanelOfNormals.R script, please specify the argument as "--chrs c(1:22, 'X', 'Y')".