orient flipped reads - adapter ligation
0
0
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)

adapter reads flipped ligation • 1.2k views
ADD COMMENT
0
Entering edit mode

How do I flip/reverse complement reads which have the 'wrong' orientation

Using reformat.sh from BBMap suite:

reformat.sh -Xmx4g in=selected.fq out=rcomp.fq rcomp=t 

Take a look at other in-line help to check additional options.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 tool bbduk.sh in filter mode (you could also use to to trim data if needed). You can do something like this

bbduk.sh -Xmx2g in=orig.fq literal=5_prime_sequence_you_know restrictleft=NN (replace with length of 5'-sequence + 5) out=stdout.fq outu=save.fq | eformat.sh -Xmx4g in=stdin.fq out=rcomp.fq rcomp=t 

You can then cat save.fq rcomp.fq > all.fq to get the full set back.

ADD REPLY
0
Entering edit mode

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 :)

ADD REPLY

Login before adding your answer.

Traffic: 1723 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6