acquireGDS | R Documentation |
gds.class
class.Acquire a (possibly cached) gds.class
object given it's path.
acquireGDS(path, type = NULL, ...)
releaseGDS(path, type = NULL, ...)
path |
String containing a path to a GDS file. |
type |
String containing the GDS file type. Case
insensitive. Can be "seqgds" for a GDS file with sequencing
data, or "snpgds" for a GDS file with SNP data. This argument
was added for the |
other |
arguments to be passed to |
acquireConn
will cache the gds.class
object
in the current R session to avoid repeated initialization. This
improves efficiency for repeated calls. The cached
gds.class
object for any given path
can be
deleted by calling releaseGDS
for the same path
.
For acquireGDS
, by default returns a regular
gds.class
object, which are identical to that returned
by gdsfmt::openfn.gds(path)
. If type
is not NULL,
a SeqVarGDSClass
that is identical to
SeqArray::seqOPen(path)
, or SNPGDSFileClass
that
is identical to SNPRelate::snpgdsOpen(path)
. Both are
inherited from gds.class
but with additional checking
and methods.
For releaseGDS
, any existing gds.class
object for the
path
is disconnected and cleared from cache, and NULL
is invisibly returned. This is equivalent to that returned by
gdsfmt::closefn.gds()
except it take path
as
input. If path=NULL
, all cached connections are removed.
Qian Liu
fn <- gdsExampleFileName()
gdscon <- acquireGDS(fn)
acquireGDS(fn) ## just re-uses the cache
acquireGDS(fn, type = "seqgds") ## construct a new GDS connection
releaseGDS(fn) ## clears the cache
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.