Skip to contents

Takes the CDS tags with translation fields and creates a FASTA file from them, or takes the ORIGIN field(s) to create a FASTA file containing nucleotide sequences instead.

Usage

genbank_to_fasta(
  file,
  id_tag = "locus_tag",
  take_origin = FALSE,
  out = NULL,
  verbose = FALSE
)

Arguments

file

A GenBank file to convert.

id_tag

A character string, denotes which CDS field to use as the header of the FASTA file sequences. This field must exist in all CDS tags present in the GenBank file.

take_origin

Logical. If TRUE, will take the ORIGIN field(s) to create a FASTA file containing nucleotide sequences instead.

out

Output file path.

verbose

Logical. If TRUE, report the time when it starts writing to the output file.

Value

Returns nothing (invisible NULL).

Details

If out is left as NULL, the current working directory will be used instead.

Author

Mike Puijk

Examples

if (FALSE) { # \dontrun{
genbank_to_fasta(file = "genome1.gb", out = "genome1")
} # }