cnvkit icon indicating copy to clipboard operation
cnvkit copied to clipboard

Purity-adjusted output from genemetrics

Open apmills opened this issue 4 years ago • 2 comments

Is it possible to adjust for purity and ploidy via cnvkit.py call and then use this data to run genemetrics? The call command only produces a cns file, which leaves the cnr file required for genemetrics unadjusted. Does genemetrics produce an accurate result if run with an unadjusted cnr file and a purity-adjusted cns file?

Thanks in advance.

apmills avatar Apr 23 '21 14:04 apmills

Hi @apmills!

Does genemetrics produce an accurate result if run with an unadjusted cnr file and a purity-adjusted cns file?

Yes, that's right, and this is exactly how you should run it.

When you run cnvkit.py call in clonal mode, the log2 values in the resulting .call.cns file will be already adjusted by purity and ploidy. When you next run cnvkit.py genemetrics on the original .cnr + .call.cns, it will use those adjusted log2 values to identify genes with CN gain/loss.

The values which cnvkit.py genemetrics gets from the .cnr file (such as depth, weight, or probes) are not adjusted during calling anyway, so the .cnr file does not need any special transformations.

tskir avatar Apr 24 '21 03:04 tskir

Hello,

Please can you elaborate what is the difference in using the 2 commands where we adjust for purity and ploidy.

cnvkit.py call Sample.cns -y -v Sample.vcf -m threshold -t=-1.1,-0.4,0.3,0.7 --purity 0.7 --ploidy 3 -o Sample.call.cns

cnvkit.py call Sample.cns -y -v Sample.vcf -m clonal --purity 0.7 --ploidy 3 -o Sample.call.cns

john-alexander avatar Apr 26 '21 10:04 john-alexander