countGenotype | R Documentation |
This function calculates several summary statistics of
genotype calls and alleles per marker and per sample.
Those values will be stored in the SnpAnnotaionDataFrame slot
and the sample slot and obtained via getter
functions, e.g.s
getCountGenoRef()
, getCountAlleleRef()
, and getMAF()
.
countGenotype(object, target = "both", node = "raw", ...)
## S4 method for signature 'GbsrGenotypeData'
countGenotype(object, target, node)
object |
A GbsrGenotypeData object. |
target |
Either of "marker" and "sample". |
node |
Either of "raw", "filt", and "cor". See details. |
... |
Unused. |
#' Genotype call data can be obtained from the "genotype" node,
the "filt.genotype" node, or the "corrected.genotype" node of
the GDS file with node = "raw"
, node = "filt"
, or node = "raw"
,
respectively.
The setCallFilter()
function generate filtered genotype call data in the
"filt.genotype" node which can be accessed as mentioned above.
On the other hand, the "corrected.genotype" node can be generated
via the estGeno()
function.
A GbsrGenotypeData object with genotype count information.
# 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)
# Get the proportion of missing genotype per sample.
sample_missing_rate <- getCountGenoMissing(gds,
target = "sample",
prop = TRUE)
# Get the minor allele frequency per marker.
marker_minor_allele_freq <- getMAF(gds, target = "marker")
# Draw histograms of the missing rate per sample and marker.
histGBSR(gds, stats = "missing")
# 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.