df_to_faa: Save a dataframe in FASTA format

Description Usage Arguments Value Examples

View source: R/df_to_faa.R

Description

This function writes a dataframe out as a FASTA format file

Usage

1
df_to_faa(df, file = "")

Arguments

df

a dataframe containing two columns: the sequence name and amino acid sequence itself

file

file path to save the named file to

Value

A FASTA file where protein sequences are represented in two lines: The protein name preceded by a greater than symbol, and a new second line that contains the protein sequence

Examples

1
2
3
4
my_protein <- read_faa(system.file("extdata/bat_protein.fasta", package = "ampir"))

# Write a dataframe to a FASTA file
df_to_faa(my_protein, tempfile("my_protein.fasta", tempdir()))

ampir documentation built on June 29, 2021, 9:09 a.m.