View source: R/mummer_alignment.R
genbank_to_fasta | R Documentation |
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.
genbank_to_fasta(path, output_dir = NULL)
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. |
None explicitly, but writes the FASTA formatted data to a file.
# Path to the example GenBank file in the package
gbk_file <- system.file("extdata", "BGC0000001.gbk", package = "geneviewer")
# Convert the GenBank file to FASTA format
genbank_to_fasta(gbk_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.