getMAC | R Documentation |
Obtain minor allele counts per SNP or per sample
getMAC(object, target = "marker", valid = TRUE, ...)
## S4 method for signature 'GbsrGenotypeData'
getMAC(object, target, valid)
object |
A GbsrGenotypeData object. |
target |
Either of "marker" and "sample". |
valid |
A logical value. See details. |
... |
Unused. |
You need to execute countGenotype()
to calculate sumaary statisticsto be
obtained via this function.
If valid = TRUE
, the chromosome information of markers which are
labeled TRUE
in the sample slot will be returned.
validMar()
tells you which samples are valid.
A numeric vector of the minor allele counts per marker.
# Load data in the GDS file and instantiate a [GbsrGenotypeData] object.
gds_fn <- system.file("extdata", "sample.gds", package = "GBScleanR")
gds <- loadGDS(gds_fn)
# Summarize the genotype count information and store them in the
# [marker] and [sample] slots of the [GbsrGenotypeData] object.
gds <- countGenotype(gds)
getMAC(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.