Generate markers metadata: CHROM, LOCUS, POS, REF, ALT
when missing from tidy datasets.
generate_markers_metadata(
data,
generate.markers.metadata = TRUE,
generate.ref.alt = FALSE,
biallelic = NULL,
parallel.core = parallel::detectCores() - 1,
verbose = TRUE
)
An object with a column named MARKERS
.
If CHROM
, LOCUS
, POS
are already present, the function
returns the dataset untouched.
The data can be whitelists and blacklists of markers or tidy datasets or
radiator GDS object.
(logical, optional)
Generate missing markers metadata when missing.
"CHROM", "LOCUS", "POS"
.
Default: generate.markers.metadata = TRUE
(logical, optional) Generate missing REF/ALT alleles
with: REF = A and ALT = C (for biallelic datasets, only).
It is turned off automatically
when argument markers.meta.lists.only = TRUE
and
on automatically when argument markers.meta.all.only = TRUE
Default: generate.ref.alt = FALSE
(logical) Speed up the function execution by entering
if the dataset is biallelic or not. Used internally for verification, before
generating REF/ALT info.
By default, the function calls detect_biallelic_markers
.
The argument is required if data
is a tidy dataset and not just
a whitelist/blacklist.
Default: biallelic = NULL
(optional) The number of core used for parallel
execution during import.
Default: parallel.core = parallel::detectCores() - 1
.
(optional, logical) When verbose = TRUE
the function is a little more chatty during execution.
Default: verbose = TRUE
.
Depending on argument's value, the same data is returned
in the global environment, with potential these additional columns:
CHROM, LOCUS, POS, REF, ALT
.
if (FALSE) { # \dontrun{
tidy.data <- radiator::generate_markers_metadata(data = bluefintuna.data)
} # }