This file produces 1 FASTA file for a ref_genome
object and one file
for each haplotype in a haplotypes
object.
write_fasta(
obj,
out_prefix,
compress = FALSE,
comp_method = "bgzip",
text_width = 80,
show_progress = FALSE,
n_threads = 1,
overwrite = FALSE
)
A ref_genome
or haplotypes
object.
Prefix for the output file.
Logical specifying whether or not to compress output file, or
an integer specifying the level of compression, from 1 to 9.
If TRUE
, a compression level of 6
is used.
Defaults to FALSE
.
Character specifying which type of compression to use if any
is desired. Options include "gzip"
and "bgzip"
.
This is ignored if compress
is FALSE
. Defaults to "bgzip"
.
The number of characters per line in the output fasta file.
Defaults to 80
.
Logical for whether to show a progress bar.
Defaults to FALSE
.
Number of threads to use if writing from a haplotypes
object.
Threads are split among haplotypes, so it's not useful to provide more threads
than haplotypes.
This argument is ignored if obj
is a ref_genome
object, or if
OpenMP is not enabled.
Defaults to 1
.
Logical for whether to overwrite existing file(s) of the
same name, if they exist. Defaults to FALSE
.
NULL