write_mothur_taxonomy: Write an imitation of the Mothur taxonomy file

Description Usage Arguments Details See Also

View source: R/writers.R

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

1
2
3
4
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:

1
2
3
4
5
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...

1
2
3
4
5
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


grunwaldlab/metacoder documentation built on Oct. 2, 2018, 10:25 p.m.