Using trim.seqs with several primers

Hello,
I’ve sequenced a mixture of PCR products using 454 titanium.
The PCR products were synthesised using both archaea and bacteria primers (each pair had individual barcodes) and the 454 adapters were later ligated.
As a result, I ended up with an output file in which each sequence contains one the 4 primers and some sequences contain both primers of one domain.

As I understood, preparing the oligos file in this format:
forward CATGCTGCCTCCCGTAGGAGT
reverse TCAGAGTTTGATCCTGGCTCAG
barcode AACCAACC ALP50M
barcode AACCAAGG AZAC1
barcode AACCATCG ALP2B
barcode AACCATGC ALP1B
barcode AACCGCAT ALP80M
barcode AACCGCTA ALPG2
barcode AACCGGAA AZ273

and parsing it to trim.seqs() will cause mothur to search for files that contain the forward AND the reverse and throw away those that contain only one of them (or none of them).

I’m looking for an option to parse an oligo file in the following format:
bac_forward CATGCTGCCTCCCGTAGGAGT
bac_reverse TCAGAGTTTGATCCTGGCTCAG
arc_forward TCGYGCASCAGKCGMGAAW
arc_reverse CAGGACTACVSGGGTATCTAAT
barcode AACCAACC ALP50M

And have mothur process it as: find bac_forward AND/OR bac_reverse OR arc_forward AND/OR arc_reverse.
So that mothur will recognise all sequences containing only bac_forward OR only bac_reverse OR bac_forward AND bac_reverse (in revcom form) OR bac_forward (in revcom form) AND bac_reverse …

Is that possible in any way?
Even processing only one pair at a time will do.
how do people normally deal with sequences produced using ligated adapters?

Thanks in advance,
Roey

Sounds like a headache. :slight_smile: I’d say 99% of people are not using ligated adapters but rather have primers synthesized with the adapter, barcode, and primer (in that order). With the ligation you have to do an extra few rounds of PCR that does who knows what to the relative abundances.

To do what you’d want to do, you’d probably want to do something like trim.seqs with the forward primers and flip the sequences. Using the trim.fasta output you’d then run trim.seqs again but with the reverse primers and flip the sequences. You could then also take the original fasta file, trim.seqs with the reverse primers and flip and then run trim.seqs with the forward primers. At this point, I think the sequences would all be in the right direction. You’d have to merge the fasta files and the group files. It might be easier to just write your own scripts to parse this stuff…

Hope this helps,
Pat

Thanks for the reply.
I used ligation because I was analyzing 168 samples in parallel.
Over here in Germany a biotin tagged primer costs about 100 euro a piece, which would make the synthesis costs quite high.

In the end I used trim.seqs twice (one for each domain) and the oligo file contained both fwd and rev primers (5’-3’) but I labelled both ‘forward’ this seems to do the trick.
Only a negligible number of sequences had the full contig containing both primers so I could skip having to remove the rev-comp version of each primer.

Does it sound reasonable?

Thanks again,
Roey