trim.seqs failure?

Hi all,

I am trying to use trim.seqs to exclude all sequence outside of my priming regions after I run make.contigs to pair ends. The reason for this is that a lot of my reads (MiSeq 2x250) sequenced through the priming region for the other read. When Mothur pairs the reads it does a good job of error correction, but obviously these overhanging ends with no compliment cannot be error corrected, and since these are the ends of reads they contain many errors. I’d like to trim them off.

I have tried entering sequences in an oligos file that should theoretically tell Mothur to cut everything before or after the entered sequences. However, in looking at my .fasta files after I run the command, Mothur keeps many many sequences untrimmed even though they contain those exact sequences. I’ve tried putting both degeneracy- and non-degeneracy containing sequences in the oligos file, and have played around with sequence length in the oligos file as well, and neither seems to make a difference.

Has anyone else played around with this command and had similar problems? Alternatively, is there a better way for Mothur to process paired end reads and only include the region within overlap (i.e. only sequence inside the two priming regions) in the final paired-sequence? Thanks,


You might be interested in the pcr.seqs command,

Thanks for the tip. pcr.seqs works for trimming the forward overhang off the sequences. However, I can’t get it to work for the reverse priming section. There is still a ton of variable overhangs past the reverse priming sites however I prepare my oligos file. I’ve prepared it such as

Reverse xxxxxxx

…in a tab delineated file, just like I did the forward. Again, I’ve tried using degeneracy and non-degeneracy containing sequences but I can still see many of my reads where it continues past the sequence I inputed. Is there something else I should know about making the oligos file? Why would this work for the forward primer and not for the reverse?


Are you using version 1.30? If not, we had a bug with the trimming of the reverse primer in version 1.29, and you should upgrade. If you are using 1.30, can you post a problem sequence and the oligos file?

We are using Mothur 1.30.1.

Here are three sequences that end with 7 bases that mismatch to the 7 base “reverse primer” I specified in my oligos file.




The oligos file just reads

reverse BHHNRVH

and is named oligos.oligos.

On closer inspection it looks like the sequences that slip by the filter have an A at the first position of the 7 base oligo it should end with, yet my reverse oligo does not code for an A there.

I realize this scenerio is not ideal given the large amount of ambiguities I have to code into the oligo, but the region I want to cut the sequence off at is variable. I just know that this is the sequence right before where the reverse primer is, so the sequence should stop here. Thanks.

When mothur reads your reverse primer it finds the reverse compliment, so BHHNRVH becomes DBYNDDV. Looking at the end of one of your sequences:

Y = CT


Mothur is finding the a match and removing it.