write_fasta: Write data to a fasta file.

View source: R/RcppExports.R

write_fastaR Documentation

Write data to a fasta file.

Description

Write data to a fasta file.

Usage

write_fasta(df, path)

Arguments

df

The dataframe of sequence data to write to file. The dataframe must contain the columns: "header" and "sequence". Other columns in the dataframe are permitted but will be ignored.

path

Path or connection to write to.

Examples

fasta_ex_dat = data.frame(
    header = c("seq1", "seq2", "seq3"),
    sequence = c("ATGC", "AATTGGCC", "TGACTGAC"),
    stringsAsFactors = FALSE
    )
data = write_fasta(fasta_ex_dat, "example_output.fasta")

CNuge/CamBioR documentation built on May 28, 2022, 12:23 a.m.