forked from gkarthik/ivar
-
Notifications
You must be signed in to change notification settings - Fork 39
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
How does ivar deal with conflicting/overlapping variants? #104
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I recently ran
ivar
with a sample corresponding to the Delta variant. After some tweaks I've mentioned in another issue on Github, the analysis seems to be working well. I just have one question: how doesivar
deal with overlapping variants?If I run
ivar variants
like so:samtools mpileup -A -B -d 0 -Q 0 --reference $REF sample.primertrim.sorted.bam | ivar variants -p sample.refIncluded.noBAQ -q 20 -m 10 -t 0.1 -r $REF -g reference_features.gff3
I recover the following two overlapping variants (among others):
There's also an overlapping substitution at 28249.
As you can see, the 6 bp deletion after 28247 overlaps with a single base substitution at 28253.
I then run
ivar consensus
:samtools mpileup -A -d 0 -Q 0 -B --reference NC_045512.fasta sample.primertrim.sorted.bam | ivar consensus -p refIncluded.t0.noBAQ.consensus -t 0.9 -n N
The 6 bp deletion occurs occurs as expected, but the 1 base substitution does NOT get included, despite both passing the filters in the
ivar consensus
command. I'm happy with this: given the much stronger read evidence for the deletion, I'd prefer the 6 bp deletion without the SNP appearing. However, I'm just confused as to how/why only one gets included: how/why is the deletion chosen over the SNP?If I try to use the
ivar variants
output as an input to bcftools consensus (after converting to vcf format, and bgzipping + tabixing), I get the following warning:So, it appears that the deletion is incorporated, and the next two overlapping variants are ignored. Is this what
ivar
does?Thanks!
The text was updated successfully, but these errors were encountered: