Convert dna_seg objects to FASTA files
dna_seg_to_fasta.RdTakes 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_segobject or a list ofdna_segobjects,- output_path
Path to the folder that will contain the output files.
- id
The
dna_segcolumn 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_segobjects.- unique_ids
Logical. If
TRUE, all values in the column provided byidhave to be unique. IfFALSEit 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 theidcolumn 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")
} # }