gdb.export_fasta: Export a database genome as FASTA

View source: R/compute-sequence.R

gdb.export_fastaR Documentation

Export a database genome as FASTA

Description

Writes all contigs from a misha database to a multi-FASTA file.

Usage

gdb.export_fasta(
  file = NULL,
  groot = NULL,
  line_width = 80L,
  chunk_size = 1000000L,
  overwrite = FALSE,
  verbose = FALSE
)

Arguments

file

Output FASTA file path

groot

Optional database root path. If NULL, uses current database.

line_width

Number of bases per FASTA line. Default: 80.

chunk_size

Number of bases to extract per chunk while writing. Default: 1000000.

overwrite

Logical. If TRUE, overwrite existing output file. Default: FALSE.

verbose

Logical. If TRUE, prints progress messages. Default: FALSE.

Details

By default, the currently active database is used. You can also provide groot to export another database without changing the caller's active database.

Value

Invisibly returns file.

See Also

gdb.init, gseq.extract

Examples

## Not run: 
gdb.init_examples()
out <- tempfile(fileext = ".fa")
gdb.export_fasta(out)
head(readLines(out))

## End(Not run)

misha documentation built on Feb. 20, 2026, 5:08 p.m.