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

How does ivar deal with conflicting/overlapping variants? #104

Open
charlesfoster opened this issue Jun 23, 2021 · 0 comments
Open

How does ivar deal with conflicting/overlapping variants? #104

charlesfoster opened this issue Jun 23, 2021 · 0 comments

Comments

@charlesfoster
Copy link

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 does ivar 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):

REGION POS REF ALT REF_DP ALT_DP TOTAL_DP ALT_FREQ
NC_045512.2 28247 A -GATTTC 2242 2233 2479 0.900766
NC_045512.2 28253 C A 0 78 78 1

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:

The site NC_045512.2:28249 overlaps with another variant, skipping...
The site NC_045512.2:28253 overlaps with another variant, skipping...

So, it appears that the deletion is incorporated, and the next two overlapping variants are ignored. Is this what ivar does?

Thanks!

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

No branches or pull requests

1 participant