getGenotype | R Documentation |
Genotype calls are retrieved from the GDS file linked to the given GbsrGenotypeData object.
getGenotype(
object,
node = "raw",
parents = FALSE,
valid = TRUE,
chr = NULL,
phased = FALSE,
...
)
## S4 method for signature 'GbsrGenotypeData'
getGenotype(object, node, parents, valid, chr, phased)
object |
A GbsrGenotypeData object. |
node |
Either of "raw", "filt", "cor", and "parents". See details. |
parents |
A logical value or "only" whether to include data for
parents or not or to get data only for parents. Ignored if |
valid |
A logical value. See details. |
chr |
A integer vector of indexes indicating chromosomes to get read count data. |
phased |
If set |
... |
Unused. |
When node = "raw
, the raw genotype data stored in the "genotype/data" node
will be returned, while node = "filt
make the function to return the
filtered genotype data stored in the "annotation/format/FGT/data" that can
be generated via the setCallFilter()
function. node = "cor
indicates to
get the corrected genotype data stored in the "annotation/format/CGT/data"
that can be generated via the estGeno()
function. The estimated parental
genotypes, which also can be generated via the estGeno()
function and
stored in the "annotation/info/PGT" node, can be obtained with
node = "parents"
.
If valid = TRUE
, genotype calls for only valid marker and valid samples
will be obtained.
An integer matirix of genotype data which is represented by the number of reference alleles at each marker of each sample.
setCallFilter()
and estGeno()
# Load data in the GDS file and instantiate a [GbsrGenotypeData] object.
gds_fn <- system.file("extdata", "sample.gds", package = "GBScleanR")
gds <- loadGDS(gds_fn)
geno <- getGenotype(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.