andersen-lab / ivar

iVar is a computational package that contains functions broadly useful for viral amplicon-based sequencing.
https://andersen-lab.github.io/ivar/html/
GNU General Public License v3.0
115 stars 39 forks source link

iVar miss-priming issues? #91

Open dcm9123 opened 3 years ago

dcm9123 commented 3 years ago

Hi! I am currently working on the IDseq metagenomics platform to identify mapped reads to SARS-CoV-2. Basically my project consists on the sequencing of all reads from a clinical samples with COVID-19, and assemble the viral genome. The wet lab protocol is from MSSPE, so I enrich the sequencing library preparation with 73 primers spanning the viral genome. To test the pipeline, I have uploaded negative controls (water controls with the primers), and iVar seems to report a few reads that partially match the primers (about 10, 20, and up to 200 reads). Could this be some sort of miss-priming issue? Would this be fixed by using the ivar getmasked? Or is this something else? (I am attaching a picture of how my results look in this pipeline)

Screen Shot 2021-03-21 at 11 21 02 PM

The IDSeq pipeline uses the following commands:


ivar trim -e -i ivar.bam -b "~{primer_bed}" -p ivar.out

ivar consensus -q "~{ivarQualThreshold}" -t "~{ivarFreqThreshold}" -m "~{minDepth}" -n N -p "~{prefix}primertrimmed.consensus"

Thanks a lot for your help!

gkarthik commented 3 years ago

Hi, ivar will trim any reads that start or end within the coordinates provided in the BED file. It does not take the sequence of bases itself into account. So, it's possible that a few reads started at primer positions and iVar trimmed those. Does that answer your question?

ivar getmasked is used to report if there are mismatches between the primer and the reference sequence. That is for downstream filtering for variant calling so should not affect primer trimming.