write_silva_fasta: Write an imitation of the SILVA FASTA database

Description Usage Arguments Details

View source: R/writers.R

Description

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

Usage

1
2
3
4
5
6
7
write_silva_fasta(obj, file,
  tax_names = obj$get_data("taxon_names")[[1]],
  other_names = obj$get_data("other_name")[[1]],
  ids = obj$get_data("ncbi_id")[[1]],
  start = obj$get_data("start_pos")[[1]],
  end = obj$get_data("end_pos")[[1]],
  sequences = obj$get_data("silva_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

other_names

(character named by taxon ids) Alternate names of taxa. Will be added after the primary name.

ids

(character named by taxon ids) Sequence ids

start

(character) The start position of the sequence.

end

(character) The end position of the sequence.

sequences

(character named by taxon ids) Sequences

Details

The output file has a format like:

1
2
3
4
>GCVF01000431.1.2369 Bacteria;Proteobacteria;Gammaproteobacteria;Oceanospiril...
CGUGCACGGUGGAUGCCUUGGCAGCCAGAGGCGAUGAAGGACGUUGUAGCCUGCGAUAAGCUCCGGUUAGGUGGCAAACA
ACCGUUUGACCCGGAGAUCUCCGAAUGGGGCAACCCACCCGUUGUAAGGCGGGUAUCACCGACUGAAUCCAUAGGUCGGU
...

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