# Removing sequence primers

**URL:** https://forum.mothur.org/t/removing-sequence-primers/2313
**Category:** Commands in mothur
**Created:** [March 23, 2015, 4:48am UTC](https://forum.mothur.org/t/removing-sequence-primers/2313 "2015-03-23T04:48:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alan\_Wong](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Alan\_Wong](https://forum.mothur.org/u/Alan_Wong)
#### Post date: [March 23, 2015, 4:48am UTC](https://forum.mothur.org/t/removing-sequence-primers/2313/1 "2015-03-23T04:48:45Z")

</div>

Hi all,

I recently got some Bacteria sequence using MiSeq and 27F/519R primers.

I was told that I need to remove the primers from the fastq files.

I would like to ask how do I do that?

Below is my pipeline

Step 1  
fastq.info(wholesample.txt) \<-- This will make all my samples into forward and reverse fasta files (10 samples)

Output: fasta files, each samples with forward and reverse fasta (sample 1 forward.fasta, sample 1 reverse.fasta, sample 2 forward.fasta, sample 2 reverse.fasta…)

Step 2:  
trim.seqs(fasta=sample 1 forward.fasta, oligos=forward primer.oligos)

Do I need to trim away the primers the files one by one?

And afterwards do I need to make it back to fastq by make.fastq command?

Then proceed with make.contigs with the samples with primers trimmed away?

Also, I am not sure for the oligos files, do I need to make a paired primer oligos, or do I make a oligos file like below?:

forward ACCGTTAC…  
reverse ACTTCCCC…

I am not sure how to trim away the primers for analysis. Thank you in advance

---

<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: [March 23, 2015, 3:58pm UTC](https://forum.mothur.org/t/removing-sequence-primers/2313/2 "2015-03-23T15:58:07Z")

</div>

The make.contigs command can remove the primers and assemble the reads for you, [http://www.mothur.org/wiki/Make.contigs](http://www.mothur.org/wiki/Make.contigs). Here’s a link to the oligos file format, [http://www.mothur.org/wiki/Oligos\_File](http://www.mothur.org/wiki/Oligos_File).
