GAworkshop icon indicating copy to clipboard operation
GAworkshop copied to clipboard

Issue on GAworkshop/contents/03_sexdet/sexdet.rst

Open shangshanzhizhe opened this issue 6 years ago • 3 comments
trafficstars

Hi Stephan Schiffels,

I'm referring your coverage calculation method in the sexdet.rst and have a question. The file was referred by the paper, and I think that you misunderstood the Coverage and Depth.

In your sexDetermination.awk example: if we use the 'xReads += cov', the xReads is how many times the Reads totally covered at the selected sites, and the 'xReads / xSites' will get the average depth of selected sites. But It means "Covered" when there IS Reads mapped on the site. So Maybe the 'xReads += cov' should be 'xReads += cov' (changed to 'xReads += 1' ) with the judgment 'if cov > 0'.

May I have your suggestion on this issue? Thanks a lot! By the way, your MSMC is excellent~

Shangzhe

shangshanzhizhe avatar Aug 13 '19 10:08 shangshanzhizhe

Hi Shangzhe.

I don’t understand. The two lines

xReads += cov

and

xReads += cov if cov > 0

are exactly the same. If you add 0, it’s as if you don’t add anything, so it’s the same.

Stephan

On 13. Aug 2019, at 12:01, Shangzhe Zhang [email protected] wrote:

Hi Stephan Schiffels,

I'm referring your coverage calculation method in the sexdet.rst and have a question. The file was referred by the paper https://doi.org/10.1093/molbev/msy220, and I think that you misunderstood the Coverage and Depth.

In your sexDetermination.awk example: if we use the 'xReads += cov', the xReads is how many times the Reads totally covered at the selected sites, and the 'xReads / xSites' will get the average depth of selected sites. But It means "Covered" when there IS Reads mapped on the site. So Maybe the 'xReads += cov' should be 'xReads += cov' with the judgment 'if cov > 0'.

May I have your suggestion on this issue? Thanks a lot! By the way, your MSMC is excellent~

Shangzhe

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stschiff/GAworkshop/issues/3?email_source=notifications&email_token=AADNBGXVOZYHUYJVWWISUMLQEKBBBA5CNFSM4ILJEPM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HE5IOBQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AADNBGQT2ZSUHGVHZ5A6UWDQEKBBBANCNFSM4ILJEPMQ.

stschiff avatar Aug 14 '19 18:08 stschiff

Hi Stephen,

Sorry for the mistake. It should be xReads += 1 if cov > 0.

Shangzhe

shangshanzhizhe avatar Aug 15 '19 01:08 shangshanzhizhe

No, I think it should be xReads += cov. You want to calculate the mean coverage, and not-covered sites should not contribute. You want to compute

"Total number of reads mapping on sites” divided by “total number of sites considered”

Stephan

On 15. Aug 2019, at 03:50, Shangzhe Zhang [email protected] wrote:

Hi Stephen,

Sorry for the mistake. It should be xReads += 1 if cov > 0.

Shangzhe

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stschiff/GAworkshop/issues/3?email_source=notifications&email_token=AADNBGULJGUVPTTYOZLG343QESY7FA5CNFSM4ILJEPM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4KTORI#issuecomment-521484101, or mute the thread https://github.com/notifications/unsubscribe-auth/AADNBGUQB4IQWBYUAFRTPS3QESY7FANCNFSM4ILJEPMQ.

stschiff avatar Aug 26 '19 08:08 stschiff