Skip to contents

This function writes a data frame to a fasta file with the same name as the data frame. The data frame is assumed to have two columns, "Header" and "Sequence", which represent the header and sequence lines of each fasta record, respectively.

Usage

write.df_to_fasta(df)

Arguments

df

A data frame containing fasta records with "Header" and "Sequence" columns.

Value

This function does not return a value, but writes a fasta file to the working directory.

Examples


sample_file_path <- system.file("extdata", "sample_fa.fasta", package = "baseq")
read.fasta_to_df(sample_file_path)
#> File C:/Users/BSL CTCRI/AppData/Local/Temp/RtmpYlDm86/temp_libpath49301e5117b7/baseq/extdata/sample_fa.fasta assigned as a dataframe with name sample_fa

write.df_to_fasta(sample_fa)
#> Data frame sample_fa written to fasta file sample_fa.fasta