Flip in trim.seqs

Let’s say I don’t always know if my sequencing provider used 5’->3’ or 3’->5’ sequencing. So I use the flip command in Trim.seqs, and if most of my resulting sequences are very short, I know it was probably 5’->3’. Is there a more elegant way to handle this matter?

OK, thinking about it, If I align and see that all sequences begin at the same place, they are probably 5’ -> 3’…

You can also set flip=T in align.seqs. Probably the best choice is to ask your sequencing provider.

If my sequences are 3’ ->5’, and I DON’T set flip=T in trim.seqs, won’t the output be garbage?

If they’re 3->5 and you don’t set flip=T in trim.seqs you can rectify it by using flip=T in align.seqs. With this setting, it will first sequence the fragment assuming you have the right direction. If the alignment is crap, then it will flip the sequence adn see if the alignment is any better. Again, it’s best to remove the guess work and figure out the correct orientation.

Did a little experiment… using 5’->3’ sequences, I analyzed them twice: once with flip=T in both trim.seqs and align.seqs, and the second time with flip=T only in align.seqs. The results were identical, meaning that flip=T in trim.seqs was not performed, either because of some bug or because MOTHUR intelligently decided that the sequences did not need it.

We have a “smart” mothur. When flip=T in align.seqs, mothur will align the sequence as well as the reverse compliment of the sequence and choose the better alignment.


I have a similar issue and thought I could continue this post instead of starting a new thread.

I’m trying to demultiplex a sample using trim.seqs and a oligos file. I am not able to get mothur to find reverse complemented sequences. As I understand it, if you set the flip option to TRUE, mothur should try to find barcodes/primers also in the reverse complement. For me this does not work.
Here is an example of what I mean.

I have a fasta file (seqs.fasta) containing 2 sequences, one of which is reverse complemented from the other


The oligos file I’m using looks like this:


From mothur, the following two commands produce the same result, seq1 is trimmed and found in seqs.trim.fasta and seq1_rc is in seqs.scrap.fasta with the ‘|f’ flag attached

trim.seqs(flip=T, fasta=seqs.fasta, oligos=oligos.txt)
trim.seqs(flip=T, fasta=seqs.fasta, oligos=oligos.txt, flip=T)

Am I just completly misuderstanding this?

Of course, as soon as I posted the question, I found the answer. I should have used the checkorient=T flag.
And I also noticed that I revived a year old thread, the date was throwing me off.