We will be offering an R workshop December 18-20, 2019. Learn more.


From mothur
Revision as of 14:19, 17 November 2009 by Westcott (Talk | contribs) (label & line)

Jump to: navigation, search

bin.seqs prints out a fasta-formatted file where sequences are ordered according to the OTU that they belong to. Such an output may be helpful for generating primers specific to an OTU or for classification of sequences. For this tutorial, download and decompress AmazonData.zip.

Default settings

To execute the bin.seqs() command a list file must be read into mothur and the fasta option must be used to provide a fasta-formatted file that has the sequences represented in the list file.

mothur > read.dist(phylip=98_sq_phylip_amazon.dist)
mothur > cluster(cutoff=0.10)
mothur > bin.seqs(fasta=amazon.fasta)


mothur > read.otu(list=98_sq_phylip_amazon.fn.list)
mothur > bin.seqs(fasta=amazon.fasta)

This command will generate 12 fasta-formatted files. Each file represents a different OTU. Within each file the sequences are sorted according to the OTU that they belong to. The sequence names have been modified to indicate its OTU grouping. For example, the file 98_sq_phylip_amazon.fn.0.10.fasta contains the following output:


Here you can see that each sequence name has had a "|" and a number appended to it. The number indicates the OTU that the sequence belongs to.



A names file indicating sequence names that are identical to a references sequence, such as that used for the read.dist command, may be inputted to bin.seqs so that the fasta and list files are complementary. The following commands illustrate this:

mothur > read.dist(column=96_lt_column_amazon.dist, name=amazon.names, cutoff=0.10)
mothur > cluster()
mothur > bin.seqs(fasta=amazon.unique.fasta, name=amazon.names)


There may only be a couple of lines in your OTU data that you are interested in running through bin.seqs(). There are two options. You could: (i) manually delete the lines you aren't interested in from your list file; (ii) or use the label option. If you only want to read in the data for the lines labeled unique, 0.03, 0.05 and 0.10 you would enter:

mothur >  bin.seqs(fasta=amazon.fasta, label=unique-0.03-0.05-0.10)