Learn R Programming

RNOmni (version 0.2.2)

RNOmni: Rank-Normal Omnibus Test

Description

Adaptive association test that synthesizes the DINT and IINT approaches. First, the direct and indirect INT based association tests are applied. An omnibus statistic is calculated based on whichever approach provides more evidence against the null hypothesis of no genotypic effect. Details of the method are discussed in the vignette.

Usage

RNOmni(y, G, X, S, method = "AvgCorr", k = 3/8, B = 100, set.rho,
  keep.rho = F, keep.stats = F, parallel = F, check = T)

Arguments

y

Numeric phenotype vector.

G

Numeric snp by obs genotype matrix.

X

Numeric obs by feature covariate matrix.

S

Numeric obs by feature structure matrix.

method

Method used to estimate correlation for the omnibus test, either "AvgCorr", "Bootstrap", or "Manual".

k

Offset applied during rank-normalization. See rankNormal.

B

If using method=="Bootstrap", number of bootstrap samples for correlation estimation.

set.rho

If using method=="Manual", the fixed value of rho, either a single value or a vector of length==nrow(G);

keep.rho

Logical indicating whether to return the correlation parameter estimated during omnibus calculation. Defaults to FALSE.

keep.stats

Logical indicating whether to return the interim test statistics calculated by DINT and IINT. Defaults to FALSE.

parallel

Logical indicating whether to run in parallel. Must register parallel backend first.

check

Logical indicating whether to check the input.

Value

A numeric matrix with three columsn and one row per locus, i.e. row, in the genotype matrix, and three columns. The columns are p-values obtained by D-INT, IINT, and the omnibus test.

Details

Assigning a p-value to the omnibus statistic requires estimation of the correlation between the test statistics estimated by DINT and IINT. When many loci are under consideration, a computationally efficient approach is to take the correlation of the observed test statistics across loci (method="AvgCorr"). Alternatively, when there are fewer loci, or locus specific estimates are desired, the correlation may be estimated using bootstrap (method="Bootstrap"). When using the bootstrap approach, consider registering a parallel backend and setting parallel=T. To manually provide an estimate of the correlation between the test statistics, set (method="Manual") and specify (set.rho).

Examples

Run this code
# NOT RUN {
y = RNOmni::Y[,1];
Gsub = RNOmni::G[1:10,];
X = RNOmni::X;
S = RNOmni::S;
# Omnibus test against normal phenotype using the average correlation method 
p = RNOmni::RNOmni(y=y,G=Gsub,X=X,S=S,method="AvgCorr");
# Omnibus test against normal phenotype using the bootstrap correlation method
p = RNOmni::RNOmni(y=y,G=Gsub,X=X,S=S,method="Bootstrap",B=10);
# }

Run the code above in your browser using DataLab