Hello,
I have merged Illumina reads and try to filter out all reads that have both, a recognisable fwrd and a recognisable reverse primer and then to trimm those primers.
And I'd like to do this in as few commands as possible.
So far I am using the following code for filtering. Note that if I specify a restrictleft & restrictleft argument no primers are found for some reason
Code:
bbduk2.sh in=16S_analysis/XXX.fna \
fliteral=CCTACGGGNBGCASCAG,GACTACNVGGGTATCTAATCC \
minkmerhits=2 \
k=17 \
copyundefined \
rcomp=t \
hammingdistance=1 \
outm='16S_analysis/with_Primer.fasta' \
out='16S_analysis/no_F_Primer.fasta' \
stats='16S_analysis/Primer_stats.txt'\
overwrite=true \
-Xmx6g
I can now take this file a search for the foward primer, trimm with lliteral and then do it for the reverse primer. But this is not ideal. Can it be done in one step?
thanks!
Fabian