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
)

Arguments

obj

A ref_genome or haplotypes object.

out_prefix

Prefix for the output file.

compress

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.

comp_method

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".

text_width

The number of characters per line in the output fasta file. Defaults to 80.

show_progress

Logical for whether to show a progress bar. Defaults to FALSE.

n_threads

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.

overwrite

Logical for whether to overwrite existing file(s) of the same name, if they exist. Defaults to FALSE.

Value

NULL