saveSequence: Save Sequence

View source: R/saveSequence.R

saveSequenceR Documentation

Save Sequence

Description

Save Sequence

Usage

saveSequence(x, file = NULL)

Arguments

x

Either a phyloseq object with refseq information or a object of class DNAStringSet.

file

File name with extension ".fasta" or ".fa", e.g. 'myseqs.fasta' or file path where you wish to save the output fasta e.g. 'mypath/myseqs.fasta'. As a fail safe, default is NULL which returns an error.

Details

Saves sequences either from a DNAStringSet or refseq slot phyloseq object. If taxa_names is sequences, use 'add_refseq' function from microbiomeutilties before using this function.

Value

A fasta file saved in user specified location

Author(s)

Sudarshan A. Shetty

Examples


# data("SprockettTHData")
# ps <- SprockettTHData
# seq_id <- c("ASV_30_Lachnospiraceae", "ASV_451_UC5-1-2E3", "ASV_586_CAG-56")

# saveSequence(ps,
#             file="inst/extras/sequences.fasta")

RIVM-IIV-Microbiome/biomeUtils documentation built on July 20, 2023, 10:29 a.m.