We will be offering an R workshop December 18-20, 2019. Learn more.
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.
mothur > bin.seqs(list=98_sq_phylip_amazon.an.list, fasta=amazon.fasta)
This command will generate 12 fasta-formatted files. Each file represents a different label. 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.an.0.10.fasta contains the following output:
>U68589 1 TAATACGTAGGGTGCAAGCGTTGCCCGGGTTTATTGGGCGTAAAGGGCGCGTAGGCGGCTCGACACGTCCGTTGTGAAATCGCC... >U68590 2 TAATACGGGGGGAGCAAGCGTTGTTCGGATTTACTGGGCGTAAAGGGCGCGTATGCGGCCAGCGCAAGTCAGTTGTGAAATCTC... >U68591 3 CGTAGGGTCCAAGCGTTATCCGGAATTACTGGGCGTAAAGAGTTGCGTAGGTGGCATAGTAAGCAGATAGTGAAATGATACGGC... >U68687 4 TAATACAGAGGTCCCAAGCGTTGTTCGGATTCACTGGGCGTAAAGGGTGCGTAGGTGGTGAGGTAAGTCGGATGTGAAATCTCC... >U68592 4 TAATACAGAGGTCCCGAGCGTTGTTCGGATTCACTGGGCGTAAAGGGTGCGTAGGTGGTGGGATAAGTCGGATGTGAAATCTCG... ...
The number indicates the OTU that the sequence belongs to.
If you provide a group file, then in addition to the OTU number the group will also be provided.
>U68589 forest 1 TAATACGTAGGGTGCAAGCGTTGCCCGGGTTTATTGGGCGTAAAGGGCGCGTAGGCGGCTCGACACGTCCGTTGTGAAATC... >U68590 forest 2 TAATACGGGGGGAGCAAGCGTTGTTCGGATTTACTGGGCGTAAAGGGCGCGTATGCGGCCAGCGCAAGTCAGTTGTGAAAT... >U68591 forest 3 CGTAGGGTCCAAGCGTTATCCGGAATTACTGGGCGTAAAGAGTTGCGTAGGTGGCATAGTAAGCAGATAGTGAAATGATAC... >U68687 pasture 4 TAATACAGAGGTCCCAAGCGTTGTTCGGATTCACTGGGCGTAAAGGGTGCGTAGGTGGTGAGGTAAGTCGGATGTGAAATC... >U68592 forest 4 TAATACAGAGGTCCCGAGCGTTGTTCGGATTCACTGGGCGTAAAGGGTGCGTAGGTGGTGGGATAAGTCGGATGTGAAATC... ...
A names file indicating sequence names that are identical to a references sequence, may be inputted to bin.seqs so that the fasta and list files are complementary. The following commands illustrate this:
mothur > bin.seqs(list=98_sq_phylip_amazon.an.list, fasta=amazon.unique.fasta, name=amazon.names)
The count file is similar to the name file in that it is used to represent the number of duplicate sequences for a given representative sequence. It can also contain group information. If you ran the cluster command with a count file, be sure to include the count file with this command as the list file will only contain the unique names.
mothur > bin.seqs(list=98_sq_phylip_amazon.an.unique_list, fasta=amazon.unique.fasta, count=amazon.count_table)
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(list=98_sq_phylip_amazon.an.list, fasta=amazon.fasta, label=unique-0.03-0.05-0.10)
- 1.28.0 Added count parameter