computeDosage | R Documentation |
Convert the genotypesraw() allele patterns of 0x10001, 0x10002 (or 0x20001), 0x20002, 0 to the numbers 0, 1, 2, 9 for each marker. (Reverse, the order iff allele "1" has the minor allele frequency.)
computeDosage(markers_arg, range_arg, envir)
markers_arg |
a data.frame with the following 5 observations:
|
range_arg |
one row of a ranges_arg. The latter is a data frame of at least three integer columns. The columns indicate a range: a chromosome number, a start base pair value, and an end base pair value. |
envir |
'environment' containing SQLite database and other globals especially the
phenotype_table, |
a matrix of samples X markers for all the markers that have nonzero changes.
DOfamSKATRC
db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = init_famSKATRC(db, verbose = TRUE)
dimDosage = function(m, r, e) {print(dim(computeDosage(m, r, e)))}
applyFnToRanges(dimDosage, ENV$refRanges[50:60, ], ENV$refIndices, envir=ENV)
# This will use return dosage matrices for the markers in the ranges 50 - 60,
# but is basically ignores the results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.