write_rdp: Write an imitation of the RDP FASTA database

View source: R/writers.R

write_rdpR Documentation

Write an imitation of the RDP FASTA database

Description

Attempts to save taxonomic and sequence information of a taxmap object in the RDP FASTA format. If the taxmap object was created using parse_rdp, then it should be able to replicate the format exactly with the default settings.

Usage

write_rdp(
  obj,
  file,
  tax_names = obj$get_data("taxon_names")[[1]],
  ranks = obj$get_data("rdp_rank")[[1]],
  ids = obj$get_data("rdp_id")[[1]],
  info = obj$get_data("seq_name")[[1]],
  sequences = obj$get_data("rdp_seq")[[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

ranks

(character named by taxon ids) The ranks of taxa

ids

(character named by taxon ids) Sequence ids

info

(character named by taxon ids) Info associated with sequences. In the example output shown here, this field corresponds to "Sparassis crispa; MBUH-PIRJO&ILKKA94-1587/ss5"

sequences

(character named by taxon ids) Sequences

Details

The output file has a format like:

>S000448483 Sparassis crispa; MBUH-PIRJO&ILKKA94-1587/ss5	Lineage=Root;rootrank;Fun...
ggattcccctagtaactgcgagtgaagcgggaagagctcaaatttaaaatctggcggcgtcctcgtcgtccgagttgtaa
tctggagaagcgacatccgcgctggaccgtgtacaagtctcttggaaaagagcgtcgtagagggtgacaatcccgtcttt
...

See Also

Other writers: make_dada2_asv_table(), make_dada2_tax_table(), write_greengenes(), write_mothur_taxonomy(), write_silva_fasta(), write_unite_general()


metacoder documentation built on April 4, 2023, 9:08 a.m.