Skip to contents

This function reads a GenBank file, extracts the sequence and writes it to a new file in FASTA format. It parses the DEFINITION and VERSION for the header and sequences from the ORIGIN section.

Usage

genbank_to_fasta(path, output_dir = NULL)

Arguments

path

Path to the GenBank file.

output_dir

Optional path for the output FASTA file. If NULL, the output is saved in the same directory as the input file with the same base name but with a .fasta extension.

Value

None explicitly, but writes the FASTA formatted data to a file.

Examples

if (FALSE) {
genbank_to_fasta("path/to/input.gb")
}