loadGDS | R Documentation |
Load data stored in an input GDS file to R environment and create a GbsrGenotypeData instance. GBScleanR handles only one class GbsrGenotypeData and conducts all data manipulation via class methods for it.
loadGDS(x, load_filter = FALSE, ploidy = 2, verbose = TRUE)
x |
A string of the path to an input GDS file or a GbsrGenotypeData object to reload. |
load_filter |
A logical whether to load the filtering information made
via |
ploidy |
Set the ploidy of the population. |
verbose |
if TRUE, show information. |
The first time to load a newly produced GDS file will take long time due to
data reformatting for quick access. The GbsrGenotypeData object returned
from loadGDS()
can be also handled as SeqVarGDSClass-class
of the SeqArray
package.
A GbsrGenotypeData object.
# Create a GDS file from a sample VCF file.
vcf_fn <- system.file("extdata", "sample.vcf", package = "GBScleanR")
gds_fn <- tempfile("sample", fileext = ".gds")
gbsrVCF2GDS(vcf_fn = vcf_fn, out_fn = gds_fn, force = TRUE)
# Load data in the GDS file and instantiate a [GbsrGenotypeData] object.
gds <- loadGDS(gds_fn)
# Reload data from the GDS file.
gds <- loadGDS(gds)
# Close the connection to the GDS file.
closeGDS(gds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.