Convert dna_seg objects to FASTA files
dna_seg_to_fasta.Rd
Takes the (non-boundary) features from dna_seg_input
with sequences
and makes a FASTA file from them.
Usage
dna_seg_to_fasta(
dna_seg_input,
output_path = NULL,
id = "locus_id",
file_names = NULL,
unique_ids = FALSE,
verbose = FALSE,
...
)
Arguments
- dna_seg_input
Either a single
dna_seg
object or a list ofdna_seg
objects,- output_path
Path to the folder that will contain the output files.
- id
The
dna_seg
column to use as the header for the FASTA sequences.- file_names
A character vector of file names to use. If provided, must be the same length as the amount of provided
dna_seg
objects.- unique_ids
Logical. If
TRUE
, all values in the column provided byid
have to be unique. IfFALSE
it will use only the first sequence for each unique value ofid
.- verbose
Logical. If
TRUE
, report the time when it starts writing to the output file, as well as a potential warning when theid
column has duplicate values.- ...
Arguments to pass to fwrite.
Examples
if (FALSE) { # \dontrun{
dna_seg_to_fasta(dna_seg_input = list(dna_seg1, dna_seg2),
output_path = "path/to/output/folder")
} # }