df_to_faa {ampir}R Documentation

Save a dataframe in FASTA format

Description

This function writes a dataframe out as a FASTA format file

Usage

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


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()))



[Package ampir version 1.1.0 Index]