write_genlight | R Documentation |
genlight
object from: a tidy data frame, GDS file or object.Write a genlight
object from a tidy data frame or GDS file or object.
Used internally in radiator
and might be of interest for users. genlight
is a formal (S4) class
for storing genotypes of binary SNPs in a compact way, using a bit-level
coding scheme. This storage is most efficient with haploid data,
where the memory taken to represent data can be reduced more than 50 times.
However, genlight
can be used for any level of ploidy,
and still remain an efficient storage mode.
write_genlight(
data,
write = FALSE,
dartr = FALSE,
verbose = FALSE,
parallel.core = parallel::detectCores() - 2,
biallelic = TRUE
)
data |
(4 options) A file or object generated by radiator:
How to get GDS and tidy data ?
Look into |
write |
(logical, optional) To write in the working directory the genlight
object. The file is written with |
dartr |
(logical, optional) For non-dartR users who wants to have a genlight
object ready for the dartR package. This option transfer or generates:
|
verbose |
(optional, logical) When |
parallel.core |
(optional) The number of core used for parallel
execution during import.
Default: |
biallelic |
(logical, optional) If you already know that the data is
biallelic use this argument to speed up the function.
Default: |
Thierry Gosselin thierrygosselin@icloud.com
Jombart T (2008) adegenet: a R package for the multivariate analysis of genetic markers. Bioinformatics, 24, 1403-1405.
Jombart T, Ahmed I (2011) adegenet 1.3-1: new tools for the analysis of genome-wide SNP data. Bioinformatics, 27, 3070-3071.
## Not run:
# With defaults:
turtle <- radiator::write_genlight(data = "my.radiator.gds.rad")
# Write gl object in directory:
turtle <- radiator::write_genlight(data = "my.radiator.gds.rad", write = TRUE)
# Generate a dartR ready genlight and verbose = TRUE:
turtle <- radiator::write_genlight(
data = "my.radiator.gds.rad",
write = TRUE,
dartr = TRUE,
verbose = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.