Entering edit mode
3.2 years ago
PhilippFW
•
0
Hi all,
I am analyzing 2x150bp paired-end amplicons that were amplified using one sample-indexed primer. The illumina adapters were attached using ligation, i.e. half the reads are in flipped orientation.
I am planning to use dada2 after demultiplexing to count individual amplicon variants. However this requires all reads in the same orientation.
Therefore: How do I flip/reverse complement reads which have the 'wrong' orientation (meaning sample barcode on the 3' end)? (preferred with a command line tool)
Using
reformat.sh
from BBMap suite:Take a look at other in-line help to check additional options.
Thanks for your quick reply, GenoMax.
Your solution would flip all reads, correct? How can I only select those that are in the wrong orientation? (I know the 5' sequence of "wrong" reads
If you had noticed I had said
selected.fq
to only choose reads you want to RC. You can get those reads by using another toolbbduk.sh
in filter mode (you could also use to to trim data if needed). You can do something like thisYou can then
cat save.fq rcomp.fq > all.fq
to get the full set back.BBduk failed for an unknown reason, but I managed to select the correct reads using "je demultiplex" and used reformat.sh to reverse complement
Thx for your help :)