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.
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.
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
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](https://user-images.githubusercontent.com/9283107/113265173-1b14c480-92d4-11eb-9b68-1dcddd3f3324.png)
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](https://user-images.githubusercontent.com/9283107/113265205-249e2c80-92d4-11eb-9a4b-f2a9718f6011.png)
Desktop (please complete the following information):
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