Mega2SKAT: execute the CRAN SKAT function on a subset of the gene...

Mega2SKATR Documentation

execute the CRAN SKAT function on a subset of the gene transcripts

Description

Execute the SKAT function on the first gs default gene transcripts (gs = 1:100). Update the envir$SKAT_results data frame with the results.

Usage

Mega2SKAT(f, ty, gs = 1:100, genes = NULL, skat = SKAT::SKAT, envir = ENV, ...)

Arguments

f

SKAT_Null_Model formula. If this is non NULL, envir$obj is initialized by calling SKAT_Null_Model(f, out_type = ty). If you need to specify additional arguments to the Model viz. (data, Adjustment, n.Resampling, type.Resampling) or need to use a different model viz. SKAT_NULL_emmaX,
SKAT_Null_Model_ChrX set the formula to NULL, then before Mega2SKAT is called, build the model you need and assign it to ENV$obj.

ty

type of phenotype C/D = Continuous/Binary 5 (internal type 1/2)

gs

a subrange of the default transcripts (refRanges) over which to calculate the DOSKAT function.

genes

a list of genes over which to calculate the DOSKAT function. The value, "*", means use all the transcripts in the selected Bioconductor database. If genes is NULL, the gs range of the internal refRanges will be used.

skat

alternate SKAT function, viz. SKATBinary, SKAT_CommonRare. If it is also necessary is to pass additional arguments to the SKAT function, they may be added to the end of the Mega2SKAT function and will be passed. See examples

envir

'environment' containing SQLite database and other globals

...

extra arguments for SKAT

Value

None the data frame with the results is stored in the environment and named SKAT_results, viz. envir$SKAT_results

Note

The SKAT_Null_Model is called if the formula, f, is not NULL. A helper function SKAT3arg is defined for the 3 argument callback function which in turn calls DOSKAT with the appropriate arguments (including those additional to the Mega2SKAT function).

See Also

init_SKAT

Examples

db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = init_SKAT(db, verbose = FALSE, allMarkers = FALSE)
ENV$verbose = FALSE
ENV$SKAT_results = ENV$SKAT_results[0, ]
Mega2SKAT(ENV$phe[, 3] - 1 ~ 1, "D", kernel = "linear.weighted", 
          weights.beta = c(0.5, 0.5), gs=50:60 )


# donttestcheck: try this below if there is time
 Mega2SKAT(ENV$phe[, 3] - 1 ~ 1, "D", kernel = "linear.weighted", 
           weights.beta = c(0.5, 0.5), genes=c("CEP104") )


ENV$SKAT_results


Mega2R documentation built on May 29, 2024, 1:14 a.m.