DOSKAT | 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.) Ignore markers that have no variants (unless allMarkers is TRUE).
Finally, invoke SKAT
with the converted genotype matrix, Null model saved in envir$obj,
and any additionally supplied arguments.
Save information about the range and the p.value calculated by SKAT
in envir$SKAT_results.
DOSKAT(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 |
... |
extra arguments for SKAT |
None
This function accumulates output in the data frame, envir$SKAT_results. It will print out the lines as they are generated if envir$verbose is TRUE. It does not write the data frame to a file. You must save the data frame. You also must initialize the data frame when necessary.
init_SKAT
, Mega2SKAT
db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = init_SKAT(db, verbose = TRUE, allMarkers = FALSE)
Mega2SKAT(ENV$phe[, 3] - 1 ~ 1, "D", gs=1:1)
# donttestcheck: try this below instead if there is time
Mega2SKAT(ENV$phe[, 3] - 1 ~ 1, "D", kernel = "linear.weighted",
weights.beta = c(0.5, 0.5), genes=c("CEP104") )
# DOSKAT is called internally to Mega2SKAT. init_SKAT and Mega2SKAT need to be
# called to set up the environment for DOSKAT to run. You should ignore DOSKAT
# and use Mega2SKAT instead
#
applyFnToRanges(DOSKAT, ENV$refRanges[50:60, ], ENV$refIndices)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.