save_fasta: outputs a FASTA file from a phyloseq object

Description Usage Arguments Value Examples

View source: R/microbiome_tools.R

Description

This function outputs a FASTA-formatted text file from a phyloseq object

Usage

1
save_fasta(ps = ps, file = NULL, rank = NULL)

Arguments

ps

A phyloseq object that contains refseq. If there the refseq slot is not filled, this function will try pull the sequences from get_taxa

file

(optional) A file name that ends in ".fasta" or ".fa". If a file name is not supplied, the file will be named after the phyloseq object.

rank

(optional) A taxonomic rank from the tax_table which will be used to name the sequences. If no rank is supplied, samples will be named ASV_#

Value

This function saves a FASTA-formatted text file from the input phyloseq object.

Examples

1
2
save_fasta(ps)
save_fasta(ps = ps, file = "sequences.fasta", rank = "Genus")

DanielSprockett/reltools documentation built on May 5, 2019, 12:27 p.m.