Closed Gian77 closed 6 months ago
A couple things.
We don't recommend using removePrimers
on Illumina data. It was developed to solve some specific issues with long-read sequencing data, but it is not very performant with read numbers, and there are other more fully featured methods like cutadapt or trimmomatic for custom primer detection and removal.
That said, in most cases the best solution is to use filterAnd Trim(..., trimLeft=c(FWD_PRIM_LEN, REV_PRIM_LEN)
to remove primers. This works as long as the primers are all a constant length, and always at the start of the forward and reverse reads respectively (which is usually the case for the common amplicon library strategies).
As to what you are seeing, it seems that you may have replaced REV_primer
the REV_COMP_primer
in your removePrimers
call. In the code above it was REV_primer
that was being detected in many of the R2 reads. Probably REV_COMP_primer
is not appearing in the R2 reads at all, and thus no reads are passing removePrimers
.
Thank you so much for the answer, I will use cutadapt
.
Gian
Hello, I am trying to trim the primer off of 16S Miseq reads ( I am using just 4 samples, 8 fastq PE files as a toy dataset ) and I am having trouble understanding how the
removePrimers
function works.Perimers are present as you can see, when I search for them
When I try to trime them off the reads, it seem no primers is detected
Thanks much,
Gian