# make.contigs, how to remove primers and barcodes

**URL:** <https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476>\
**Category:** Commands in mothur\
**Created:** [August 27, 2013, 12:54pm UTC](https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476 "2013-08-27T12:54:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrintaka](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jrintaka](https://forum.mothur.org/u/jrintaka)\
**Post date:** [August 27, 2013, 12:54pm UTC](https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476/1 "2013-08-27T12:54:49Z")

</div>

Hi!  
Iâ€™m trying to make contigs from my paired end MiSeq reads following your MiSeq SOP. I examined the output of make.contigs in stability.trim.contigs.fasta file and I found out that the contigs still contain sequences for my primers, barcodes and adaptors. I should get rid of these extras, right? Next I tried joining the contigs and using an .oligos file with my primers and bar code sequences (as suggested in the SOP), but this resulted in an empty join.trim.contigs.fasta file. Obviously Iâ€™m doing something wrong. Iâ€™m not sure if I compiled my .oligos file correctly. Any suggestions?

Thanks!

Here is an example of a contig that contains my barcodes and primers.

> M01168\_43\_000000000-A3F87\_1\_1101\_19338\_7496  
> GTGCACCTCCCCCCCCCTCACATTATTTGCCTTTTTTTGTTTTAATGATACGGCGCCCACCGAGATCTACACCATGACGTACGTCGTGCACCAGGCGCGAATCATTCACAATGGGCGCAAGCCTGATGATGCCACGCCGCGTGCGGGATGAAGGCCCTCTGGGTTGTAAACCGCTGTCAATGAAGGGGAAACGTATGGTGTTAACAGCGCCATATTTGACTGCTTCGTAAAGGAAGCCCCGGCAAAACATGTGCCAGCCGCCGCGGTAAAACCAGCCACTGACTGACTGGCTCCATATCGCATGCCGTCTTCTGCTTGGAAAAAAAAAAAAACAGCCAGGCACATAGACACAT

And here is a sample of my .oligos file.  
primer GYGCASCAGKCGMGAAW GCBGGTDTTACCGCGGCGGCTGRCA

BARCODE CATGACGTACGTC GAGTCA UH-1  
BARCODE CATGACGTACGTC CTATGA UH-2

---

<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:** [August 27, 2013, 4:12pm UTC](https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476/2 "2013-08-27T16:12:05Z")

</div>

Could you post the forward and reverse reads? What is the trash code mothur is giving you in the scrap file for this sequence?

---

<div class="post-metadata">

**Author:** ![jrintaka](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jrintaka](https://forum.mothur.org/u/jrintaka)\
**Post date:** [August 28, 2013, 12:54pm UTC](https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476/3 "2013-08-28T12:54:55Z")

</div>

Here are some sequences that are hopefully a better illustration of this problem. The first 2 sequences are individual fwd and rev reads and the 3rd one is a contig that I got by using make.contigs(file=stability.file). The primer sequences (below) can be found in the individual reads + in the contig. The way the contig is constructed doesn’t seem right to me (the amplicons I’m trying to analyze should be about 200 bp long). What can I do to get rid of the primer sequences from the reads?

@M01168:43:000000000-A3F87:1:1101:14789:1828 1:N:0:13  
CTCACAGCCCTGGTCATGGCCCGAACCTTGTGGCGATTGCGGTTTCGGGGATTGCGGCACGTGTCAGCCGCCGCGGTAAAACCAGCCACTGACTGACAGGCGCCATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAATAAAACAAAGCAATAAGCGACTCTAAACAGACAGGATGACATATCAACCATTAAAAAAGTGACAAGAAAAAGGACAAAAGTTGCTAAAAAAAAAGAACGACAAAGCTGTGG

@M01168:43:000000000-A3F87:1:1101:14789:1828 2:N:0:13  
CGTGCCGCAATACCCGAAACCGCAAGCGCCACAAGGTTCGGGCCATGACCAGGGCTGTGATATTCGCGCCTGGGGCGCGACGTACGTCATGGTGTAGATCTCGGTGGTCGCCGTATCATTAAAAATAAAAAAACTTCACAACTACCGACTGCATTATTAAAATAGCTCCAATGAACCGATAGATAAACGAAAAGAATAGAACATGACGAGATAGGGGAGACTGGGAGACGAAAGAAGGGCGGAAGAGGAAA

> M01168\_43\_000000000-A3F87\_1\_1101\_14789\_1828  
> TTTCCTCTTCCGCCCTTCTTTCGTCTCCCAGTCTCCCCTATCTCGTCATGTTCTATTCTTTTCGTTTATCTATCGGTTCATTGGAGCTATTTTAATAATGCAGTCGGTAGTTGTGAAGTTTTTTTATTTTTAATGATACGGCGACCACCGAGATCTACACCATGACGTACGTCGCGCCCCAGGCGCGAATATCACAGCCCTGGTCATGGCCCGAACCTTGTGGCGNTTGCGGTTTCGGGNATTGCGGCACGTGTCAGCCGCCGCGGTAAAACCAGCCACTGACTGACAGGCGCCATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAAAATAAAACAAAGCAATAAGCGACTCTAAACAGACAGGATGACATATCAACCATTAAAAAAGTGACAAGAAAAAGGACAAAAGTTGCTAAAAAAAAAGAACGACAAAGCTGTGG

primer GYGCASCAGKCGMGAAW GCBGGTDTTACCGCGGCGGCTGRCA

BARCODE CATGACGTACGTC GGAGCC EH-1

---

<div class="post-metadata">

**Author:** ![jrintaka](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jrintaka](https://forum.mothur.org/u/jrintaka)\
**Post date:** [August 29, 2013, 8:20am UTC](https://forum.mothur.org/t/make-contigs-how-to-remove-primers-and-barcodes/1476/4 "2013-08-29T08:20:55Z")

</div>

Sorry, I forgot to mention earlier that the scrap file error code in the above cases was bf.
