write.list_to_fasta {baseq}R Documentation

Write a list of sequences to a FASTA file

Description

This function takes a list of sequences and writes them to a FASTA file. The name of the list is used as the base name for the output file with the .fasta extension. Each sequence in the list is written to the output file in FASTA format with the sequence name as the header.

Usage

write.list_to_fasta(sequence_list, output_dir = getwd())

Arguments

sequence_list

A list of sequences where each element of the list is a character string representing a single sequence.

output_dir

The directory path where the output file should be written. If not provided, the working directory will be used.

Examples

sequences <- list("ACGT", "ATCG")
tempdir <- tempdir()
write.list_to_fasta(sequences, output_dir = tempdir)

# Write to working directory
# write.list_to_fasta(sequences)

# Write to custom directory
# write.list_to_fasta(sequences, output_dir = "/path/to/directory/")


[Package baseq version 0.1.4 Index]