seqGet2bGeno | R Documentation |
Gets a RAW matrix of genotypes in a packed 2-bit format.
seqGet2bGeno(gdsfile, samp_by_var=TRUE, ext_nbyte=0L, verbose=FALSE)
gdsfile |
a |
samp_by_var |
if |
ext_nbyte |
additional |
verbose |
if |
If samp_by_var=TRUE
, the function returns a sample-by-variant RAW
matrix (nrow = ceiling(# of samples / 4)
); otherwise, it returns a
variant-by-sample RAW matrix (nrow = ceiling(# of variants / 4)
). The
RAW matrix consists of a 2-bit array, with 0, 1 and 2 for dosage, and 3 for
missing genotype.
Return a RAW matrix.
Xiuwen Zheng
seqGetData
# open a GDS file
f <- seqOpen(seqExampleFileName("gds"))
str(seqGet2bGeno(f))
str(seqGet2bGeno(f, samp_by_var=FALSE))
# close the GDS file
seqClose(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.