Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexcov: different coverage scale with cram and bam inputs #36

Closed
kpalin opened this issue Nov 6, 2017 · 7 comments
Closed

indexcov: different coverage scale with cram and bam inputs #36

kpalin opened this issue Nov 6, 2017 · 7 comments

Comments

@kpalin
Copy link

kpalin commented Nov 6, 2017

With input bam files, the scaled coverage in indexcov is about 1.0 but with cram input the coverage is about 50000.

@brentp
Copy link
Owner

brentp commented Nov 6, 2017

is this for whole genome? can you share a single crai file that has this problem?

@kpalin
Copy link
Author

kpalin commented Nov 6, 2017

It's more complicated than I thought. Sent you two crai files (via funet filesender, you should have the email), one good, one bad.

@brentp
Copy link
Owner

brentp commented Nov 6, 2017

I see what you mean about scaling.

goleft indexcov -d /tmp/tt --fai /data/human/g1k_v37_decoy.fa.fai ~/Downloads/bad.cram.crai

on the bad.cram.crai that you sent. I will look into this. For #37, could you send a bam for that as well?

brentp added a commit that referenced this issue Nov 6, 2017
for nearly all cases, the previous scaling was working fine, but
for lots of chromosomes where many had 0 or low coverage, the scaling
would be off. The result would be that the coverage would not best
close to 1 for the common case. This was reported in #36
@brentp
Copy link
Owner

brentp commented Nov 6, 2017

I have found a fix for this. There was a problem with the calculation of median depth for scaling to 1 that only manifested in extreme cases like yours.

Would you try the attached binary and confirm that this resolves it for you?

thanks for reporting.

goleft.gz

@kpalin
Copy link
Author

kpalin commented Nov 7, 2017

Now all crams work but almost all bams don't. Only 2 out of 119 have median value > 10^-5.

@brentp
Copy link
Owner

brentp commented Nov 7, 2017

I fixed a bug that I introduced during that change and neglected to update the binary here. would you mind trying this one?
goleft.gz

@brentp brentp closed this as completed Mar 15, 2018
@brentp
Copy link
Owner

brentp commented Mar 15, 2018

please re-open if the problem persists with latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants