GRR.matrix {Ravages} | R Documentation |
GRR matrix for genetic data simulation
Description
Computes a GRR matrix based on a simulation model
Usage
GRR.matrix(genes.maf = Kryukov, n.case.groups = 2,
GRR = c("SKAT", "constant", "variable"),
GRR.value, GRR.function, GRR.multiplicative.factor, select.gene)
Arguments
genes.maf |
A dataframe containing at least the MAF in the general population (column |
n.case.groups |
The number of cases groups (set at 2 by default), i.e. the number of groups where variants will have a GRR greater than 1 |
GRR |
How to calculate the GRR |
GRR.value |
GRR value if |
GRR.function |
A function indicating how to calculate the GRR depending on MAF in the general population, only needed if |
GRR.multiplicative.factor |
A vector of size ( |
select.gene |
The gene(s) to be selected from the file |
Details
The GRR can be computed in three ways using the argument GRR
.
If GRR="constant"
, the same GRR is given to all the variants, its value being specified to GRR.value
.
If GRR="SKAT"
, the GRR are calculating using the formula from the paper presenting the SKAT method and thus depend on MAF.
If GRR="variable"
, the GRR are calculating using a function given by the user to GRR.function
depending only on the MAF in the general population.
The argument multiplicative.factor
contains n.case.groups
-1 values; if multiplicative.factor=1
, GRR will be the same between the different groups of cases.
The two dataframes Kryukov
(used by default) and GnomADgenes
(containing MAF in the NFE population) can be used as genes.maf
.
GRR.matrix
returns a matrix that can be used in other simulation functions such as rbm.GRR
.
Value
A matrix containing the GRR values with one column per variant and one line per cases group
See Also
Examples
#GRR calculated on the MAF from the first unit of the file Kryukov
#using the formula from the SKAT paper, with the second group of cases
#having GRR values twice as high as the first one
GRR.del <- GRR.matrix(GRR = "SKAT", genes.maf = Kryukov,
GRR.multiplicative.factor=2, select.gene = "R1")