mskcc / facets

Algorithm to implement Fraction and Copy number Estimate from Tumor/normal Sequencing.
134 stars 65 forks source link

Plot log-odds-ratio #65

Open dariober opened 6 years ago

dariober commented 6 years ago

Hello again - I have a question about the log-odds-ratio reported by emcncf (specifically in emcncf(xx)$cncf$mafR) vs the one plotted by plotSample (middle plot).

I see from the code of plotSample that mafR is transformed as sqrt(mafR) thus creating an inconsistency between plot and output data.

Is there any reason for doing this? How should the sqrt(mafR) be interpreted?

Thank you! Dario

veseshan commented 6 years ago

Because we don't know if the reference allele is in the maternal or paternal chromosome the log-odds-ratio for any het SNP can be positive or negative. But the square of it has a constant mean in a segment. What we call mafR in the output is an estimate of squared log-odds-ratio. Hence square root in plotSample. I will add this to the documentation.

Venkat

dariober commented 6 years ago

Hi- thanks for the quick reply! If I understand correctly, the quantity of interest is actually sqrt(mafR) and indeed this is what plotSample shows. So, instead of editing the documentation, wouldn't it be better to change the output from the current one, mafR, to directly report sqrt(abs(mafR))? (Of course, this would be a major change from one version of facets to another)

veseshan commented 6 years ago

Makes sense to return sqrt(abs(mafR)) since that is the underlying allelic log-odds ratio. I need to add prominent messaging so that users don't miss it. Thanks.

ZooJooFoo commented 5 years ago

Hi-I have a question about “plot the logOR data and mafR” with command:

“jseg$valor[is.finite(jseg$cnlr)”

It seems use logR(cnlr)to judge logOR(valor)? Should it be “jseg$valor[is.finite(jseg$valor)” ?

Looking forward to your explanation !

Thanks! Yang

veseshan commented 5 years ago

We are not judging logOR based on logR. We are just eliminating loci that have NA for logR. This NA can happen due to zero coverage (affects both logR and logOR) or NA in GC percentage (affects only logR since GC correction is done only for logR) both of which are low frequency events.

ZooJooFoo commented 5 years ago

Thanks for your reply! I didn't think it through before,and i got it now!

Thanks again! Yang