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

iVar doesnt trim right end of single end reads #94

Open
JenkoB opened this issue Apr 1, 2021 · 1 comment
Open

iVar doesnt trim right end of single end reads #94

JenkoB opened this issue Apr 1, 2021 · 1 comment

Comments

@JenkoB
Copy link

JenkoB commented Apr 1, 2021

Describe the bug
We are using ARTIC Illumina bioinformatic workflow to analyse SARS-Cov-2 sequences (https://github.com/CDCgov/SARS-CoV-2_Sequencing/tree/master/protocols/BFX-UT_ARTIC_Illumina). On paired-end reads is working perfectly, however we have a run of Illumina single end reads. The problem is that on Illumina single end reads iVar does not trim reverse reads from right primer on (second screen shot). Foreward reads are trimmed perfectly (first screen shot).
We are using rampart primer scheme: https://github.com/artic-network/artic-ncov2019/blob/master/primer_schemes/nCoV-2019/V3/nCoV-2019.primer.bed

To Reproduce
BWA_INDEX="path_to/artic-ncov2019/nCoV-2019.reference.fasta" (https://github.com/artic-network/artic-ncov2019/blob/master/primer_schemes/nCoV-2019/V3/nCoV-2019.reference.fasta)
PRIMER_SCHEMES_v3="path_to/nCoV-2019/V3/nCoV-2019.primer.bed" (https://github.com/artic-network/artic-ncov2019/blob/master/primer_schemes/nCoV-2019/V3/nCoV-2019.primer.bed)

bwa mem -Y -t ${THREADS} "${BWA_INDEX}" "${sample}"/*_R1_001.fastq.gz | samtools sort | samtools view -F 4 -o "${sample}"/"${NAME}".sorted.bam

ivar trim -e -i "${sample}"/"${NAME}".sorted.bam -b "${PRIMER_SCHEMES_v3}" -p "${sample}"/"${NAME}".primertrim
samtools sort "${sample}"/"${NAME}".primertrim.bam -o "${sample}"/"${NAME}".primertrim.sorted.bam

Expected behavior
Trimmed all primers from "${sample}"/"${NAME}".primertrim.sorted.bam

Screenshots
Foreward reads are ok. Upper read is .sorted.bam file before trimming, lower is *.primertrim.sorted.bam after iVar trim.
foreward_reads_iVar

Reverse reads are not trimmed correctly. Upper read is .sorted.bam file before trimming, lower is *.primertrim.sorted.bam file after iVar trim. Some reads are not trimmed from right primer backwards.
Reverse_reads_iVar

Desktop (please complete the following information):

  • OS: Ubuntu 18.04

Additional context
Please let us know if we need to change something in iVar command line or primer scheme that we are using?
Thank you.
Barbara

@gkarthik
Copy link
Member

gkarthik commented Jun 8, 2021

Hello Barbara, could you please share a test file that I could use to reproduce this issue? Thank you!

@JenkoB JenkoB closed this as completed Nov 5, 2021
@JenkoB JenkoB reopened this Nov 5, 2021
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

2 participants