metacoder (version 0.2.1)

write_mothur_taxonomy: Write an imitation of the Mothur taxonomy file

Description

Attempts to save taxonomic information of a taxmap object in the mothur `*.taxonomy` format. If the taxmap object was created using parse_mothur_taxonomy, then it should be able to replicate the format exactly with the default settings.

Usage

write_mothur_taxonomy(obj, file, tax_names = obj$get_data("taxon_names")[[1]],
  ids = obj$get_data("sequence_id")[[1]],
  scores = obj$get_data("score")[[1]])

Arguments

obj

A taxmap object

file

(character of length 1) The file path to save the sequence fasta file. This is optional.

tax_names

(character named by taxon ids) The names of taxa

ids

(character named by taxon ids) Sequence ids

scores

TBD

Details

The output file has a format like:

AY457915	Bacteria(100);Firmicutes(99);Clostridiales(99);Johnsone...
AY457914	Bacteria(100);Firmicutes(100);Clostridiales(100);Johnso...
AY457913	Bacteria(100);Firmicutes(100);Clostridiales(100);Johnso...
AY457912	Bacteria(100);Firmicutes(99);Clostridiales(99);Johnsone...
AY457911	Bacteria(100);Firmicutes(99);Clostridiales(98);Ruminoco...

or...

AY457915	Bacteria;Firmicutes;Clostridiales;Johnsonella_et_rel.;J...
AY457914	Bacteria;Firmicutes;Clostridiales;Johnsonella_et_rel.;J...
AY457913	Bacteria;Firmicutes;Clostridiales;Johnsonella_et_rel.;J...
AY457912	Bacteria;Firmicutes;Clostridiales;Johnsonella_et_rel.;J...
AY457911	Bacteria;Firmicutes;Clostridiales;Ruminococcus_et_rel.;...

See Also

Other writers: write_greengenes, write_rdp, write_unite_general