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

Transition from samtools mpileup to bcftools mpileup in variant calling #56

Open
tomkinsc opened this issue Mar 20, 2024 · 0 comments
Open

Comments

@tomkinsc
Copy link
Member

In intrahost.py::get_mpileup_allele_counts() (called directly in intrahost.py::compute_library_bias(), and ultimately used by intrahost.py::vphaser_one_sample for reporting per-library allele depths):

Usage of the former is discouraged since samtools and bcftools versions can fall out of sync, potentially causing incompatibilities in variant calling pipelines connecting samtools mpileup to bcftools call (which we don't, but it's why bcftools is now the recommended mpileup). Additionally, some parameters (ex. -L) samtools once offered have been deprecated in newer versions (this does affect our usage of samtools mpileup).

bcftools mpileup is the current alternative, however it cannot emit the simple tabular "pileup" format we currently ingest from samtools mpileip; bcftools mpileup currently only writes vcf, bcf, and compressed versions of those formats. Code underpinning bcftools mpileup is derived from a prior version of samtools mpileup, so the parameters we pass will need little to no change to suit bcftools mpileup, but changes will need to be made to viral-phylo to parse the info needed from the (v|b)cf files written by bcftools mpileup.

NB: This connects to #28 and a desired migration away from V-Phaser2 for iSNV calling. This PR and the switch to bcftools mpileup may be unnecessary if we can use vcfs from a tool like LoFreq directly rather than create them ourselves as we are in intrahost.py::merge_to_vcf() (using V-Phaser2 output).

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

1 participant