The get.lineage command reads a taxonomy file and taxon then generates a new file containing only sequences from the specified taxon. You may also include either a fasta, name, group, list, count or file to this command and mothur will generate new files for each of those containing only the selected sequences. To complete this tutorial, you are encouraged to obtain the AbRecovery dataset.

Default Settings

To run get.lineage, you must provide a taxonomy or constaxonomy file and one or more taxon names. The command will generate a *.pick.* file.

Running with a taxonomy file

To generate an taxonomy file, let’s first run classify.seqs:

mothur > classify.seqs(fasta=abrecovery.fasta, template=silva.nogap.fasta,
mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;)

This generates abrecovery.silva.pick.taxonomy a file containing the 106 sequences from Bacteria;Firmicutes;

You can select sequences from multiple taxa by separating them with dashes. Example:

 mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;-Bacteria;Bacteroidetes;)

This generates abrecovery.silva.pick.taxonomy a file containing the 187 sequences from Bacteria;Firmicutes; or Bacteria;Bacteroidetes;

You may enter your taxon names with confidence scores, doing so will get only those sequences that belong to the taxonomy and whose confidence scores is above the scores you give.

mothur > classify.seqs(fasta=abrecovery.fasta, template=silva.nogap.fasta,
mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria(100);Firmicutes(90);)

This generates abrecovery.silva.pick.taxonomy a file containing the 104 sequences from Bacteria;Firmicutes; whose confidence scores are at 100 percent for Bacteria and at or above 90 for Firmicutes.

Running with a constaxonomy file

First we need to find the consensus taxonomies for each OTU with the classify.otu command:

mothur > classify.otu(, name=final.names, taxonomy=final.taxonomy)
mothur > get.lineage(,, taxon=Bacteria;Firmicutes;, label=0.03)

This generates containing the 401 OTUs that classified to Bacteria;Firmicutes;.

fasta option

To use the fasta option, follow this example:

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;, fasta=abrecovery.fasta)

This generates the file abrecovery.pick.fasta, which contains only sequences from Bacteria;Firmicutes;

name option

To use the name option, follow this example:

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;, name=abrecovery.names)

This generates the file abrecovery.pick.names, which contains only the names of sequences from Bacteria;Firmicutes;


The dups parameter is only used in tandem with a namefile. By default, dups=TRUE, so if any sequence in a specific line in the name file is in your taxon, then all sequences in that line will be kept. This is especially useful when used with the groupfile, since for most commands your files can contain only the unique sequences, but the groupfile needs to contain all the sequences in your namefile.

group option

To use the group option, follow this example:

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;, group=abrecovery.groups)

This generates the file abrecovery.pick.groups, which contains only sequences from Bacteria;Firmicutes;

count option

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.

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;, count=abrecovery.count_table)

alignreport option

To use the alignreport option, follow this example:

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;,

This generates the file, which contains only sequences from Bacteria;Firmicutes;

list option

To use the list option, follow this example:

mothur > get.lineage(taxonomy=abrecovery.silva.taxonomy, taxon=Bacteria;Firmicutes;, list=abrecovery.fn.list)

This generates the file abrecovery.fn.pick.list, which contains only sequences from Bacteria;Firmicutes;

constaxonomy option

If you provide a constaxonomy file, mothur will select the OTUs from a shared or list file that are assigned to the requested taxon. The constaxonomy parameter requires a list or shared file.

mothur > get.lineage(,, taxon=Bacteria;Firmicutes;, label=0.03)


mothur > get.lineage(,, taxon=Bacteria;Firmicutes;, label=0.03)