# Trim.seqs with reverse MiSeq PE reads

**URL:** https://forum.mothur.org/t/trim-seqs-with-reverse-miseq-pe-reads/1523
**Category:** Commands in mothur
**Created:** [October 2, 2013, 10:41pm UTC](https://forum.mothur.org/t/trim-seqs-with-reverse-miseq-pe-reads/1523 "2013-10-02T22:41:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abeaker](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@abeaker](https://forum.mothur.org/u/abeaker)
#### Post date: [October 2, 2013, 10:41pm UTC](https://forum.mothur.org/t/trim-seqs-with-reverse-miseq-pe-reads/1523/1 "2013-10-02T22:41:43Z")

</div>

using Mothur v.1.32.1  
I am trying to use trim.seqs to pull out barcoded samples within a larger dataset and ultimately I would like to use make.contigs on those samples. I used the following trim.seqs command and example oligos file on the forward fasta and qual files and it worked beautifully, but I am having difficulties getting it to work with the reverse files.

trim.seqs(fasta=Forward.fasta, qfile=Forward.qual, oligos=barcode.txt, allfiles=t)

barcode AAGCCTTGCGTCAGACA Sample 1  
barcode AAGCCAAGGGAGGAGAC Sample 2

In my reverse files, the barcode is at the end of the sequence. If I open the fasta file and reverse complement it (barcode now at beginning of seq), the command works but then my qual file does not match (not reverse complemented). I have tried the command with a single barcode written either regularly or reverse complemented (similar to the one above) as well as with paired barcodes (barcode; seq1; seq2; sample1) but none works without reverse complementing the fasta. It seems as though I am not telling mothur to look in the right place for the barcode.

---

<div class="post-metadata">

### Author: ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)
#### Post date: [October 7, 2013, 8:26pm UTC](https://forum.mothur.org/t/trim-seqs-with-reverse-miseq-pe-reads/1523/2 "2013-10-07T20:26:51Z")

</div>

Why not use make.contigs on the whole dataset? Make.contigs will create a group file if you provide an oligos file. Then you could use get.groups to select the samples you want.

---

<div class="post-metadata">

### Author: ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)
#### Post date: [October 8, 2013, 5:49pm UTC](https://forum.mothur.org/t/trim-seqs-with-reverse-miseq-pe-reads/1523/3 "2013-10-08T17:49:32Z")

</div>

Mothur can give you the reverse of the quality file as well as a fasta file. reverse.seqs(fasta=yourFasta, qfile=yourQualityFile).
