trim.seqs, trouble locating primers and barcodes

I’m having trouble in getting Mothur to locate my primer(s) and barcodes when using trim.seqs. Thus only 8 of my >20000 sequences went into trim.fasta and the rest went into scrap. The reason for scrapping most sequences seems to be unlocated primer and barcode.

I was using command: trim.seqs(fasta=H88XYFD01.fasta, oligos=arch.oligos, qfile=H88XYFD01.qual, maxambig=0, maxhomop=10, minlength=50)

My .oligos file looks like this:

forward GYGCASCAGKCGMGAAW
#reverse GCBGGTDTTACCGCGGCGGCTGRCA
barcode AGCGCGCGC Tit-B-Arch349F_101_SB4
barcode AGCTCTATC Tit-B-Arch349F_102_CC2
barcode ATAGACATC Tit-B-Arch349F_103_MM3

And here is an example of a sequence that went into the .trim.fasta file:

H88XYFD01D45JJ xy=1581_3261
AGCGCGCGCGCGCACCAGTCGAGAAAATTACCCAATCCCGACACGGGGAGGTAGTGACAATAAATAACAATATAGGGCTCTTTCGGGTCTTATAATTGGAATGAGTACAATTCAAATCTCTTAACGAGGAACGATTGGAGGGCAAGTCTGGTGCCAGCCGCCGCGGTAACACCCGATGGCGCGAGGGAGGCGATA

And here are 2 examples of sequences that went into the scrap file because barcode and primer were not located (although I was able to locate them manually).

H88XYFD01CLSNL|br
TAGCTCTATCGTGCAGCAGTCGCGAATCTGCCGTTACTGCCTCTGATGCCAGCCGCCGCGGTAACACCTGATGGCGCGAGGGAGGCGATA

H88XYFD01BA06O|br
TAGCTCTATCGTGCACCAGGCGCGAATCACCAGCCTGTCAGCCGCCGCGGTAACACCAGATGGCGCGAGGGAGGCGATA

How should I modify my command so that the primer and bar code can be located. Allow mismatches?

trim.seqs expects the sequence to start with your barcode and then your primer. So, the initial T is throwing things off. Double check that you have the correct barcode sequences - I suspect that you really want those barcodes to start with a T. In general we allow 1 mismatch to the barcode and 2 to the primer.

Pat

Thanks, Pat!

Johanna