-
Notifications
You must be signed in to change notification settings - Fork 7
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
Incorrect rounding of methylation fractions #7
Comments
Hi @chrisamiller, Thanks for your issue submission. Can you try using the most recent version of BISCUIT (0.3.16)? If you continue to see the incorrect rounding, let me know and I will fix it. Also, if you can include a small test case (a BAM of the reads in question will suffice), that will help in getting a fix out more quickly. Thanks, |
Hi @jamorrison, We tested with the newest version (0.3.16) and obtained the same rounding error.
A small test bam can be found here: https://xfer.genome.wustl.edu/gxfer1/project/cancer-genomics/bstest.bam Thanks for looking in to this. |
Hi @abelhj, Thanks for checking the newest version. I will fix the rounding error. Can you point me to the reference used in Thanks! |
Here's that mm10 reference: |
Hi @chrisamiller and @abelhj, I have fixed the rounding error that you were seeing. The next release will break backwards compatibility (see notes on Version 1.0.0 Alpha), but the fixes will be included in that release when it arrives. In the meantime, here is a zip file containing the updated source files for Version 0.3.16: issue_7_fixes.zip. After unzipping the file, replace the current files ( Cheers, |
Appreciate the quick response, and looking forward to the new 1.0 version! |
When running pileup to identify methylated CpGs, the data seems to be incorrectly rounded.
Output produced by pileup:
Output produced by vcf2bed
There are 6 reads here, 3 on the C (all methylated) and 3 on the G (with 2 methylated). So the first error comes with the incorrect rounding on each base: The G should have a beta value of
0.667
, not0.670
. Looks like the code is rounding to two places, but outputting three. The second error comes when that fraction is propagated: There are 5 methylated reads out of 6, which should give a value of0.833
, but in this case, ends up with a value of0.835
.The corrected line should look like.
Two fixes need to be made for this error:
This was observed using biscuit version 0.3.8, running via docker container
mgibio/biscuit:0.3.8
, which just adds a couple of tools on top of thezhouwanding/biscuit_v0.3.8
image.Pileup was produced with:
biscuit pileup -q 4 -w pileup_stats.txt $reference_fasta $bam
Bed was produced with:
/usr/bin/biscuit vcf2bed -t cg -k 1 -e $vcf | /usr/bin/biscuit mergecg $reference /dev/stdin -k 2
Thanks!
The text was updated successfully, but these errors were encountered: