Description Usage Arguments Details Value References Examples
View source: R/test.hierarchy.R
Performs hierarchical testing of SNPs.
1 2 | test.hierarchy(x, y, dendr, res.multisplit, covar = NULL, SNP_index = NULL,
alpha = 0.05, global.test = TRUE, verbose = TRUE)
|
x |
The input matrix, of dimension |
y |
The response vector. It can be continuous or discrete. |
dendr |
The cluster tree obtained by hierchically clustering the SNPs
using |
res.multisplit |
The output of |
covar |
|
SNP_index |
|
alpha |
The significance level at which the FWER is controlled. Default value is 0.05. |
global.test |
Specifies wether the global null hypothesis should be
tested. Default value is |
verbose |
Report information on progress. Default value is |
The testing is performed on the cluster tree given by dendr
.
If the SNP data matrix was divided (e.g. by chromosome), and clustered
separately, the user must provide the argument SNP_index
, to specify
which part of the data is being tested.
Testing starts at the highest level, which includes all variables specified
by SNP_index
, and moves down the cluster tree. It stops when a cluster's
null hypothesis cannot be rejected anymore. The smallest, still significant
clusters will be returned.
By default the parameter global.test = TRUE
, which means that first
the global null hypothesis is tested. If the data is divided (e.g. by
chromosome), and clustered separately, this parameter can be set to
FALSE
once the global null has been rejected. This helps save time.
A list of significant SNP groups with the following components:
SNP_index |
The indeces of the SNPs in the group |
pval |
The p-value of the SNP group |
Buzdugan, L. et al. (2015), Assessing statistical significance in predictive genome-wide association studies
1 2 3 4 5 6 7 8 | library(MASS)
x <- mvrnorm(60,mu = rep(0,60), Sigma = diag(60))
beta <- rep(0,60)
beta[c(5,9,3)] <- 1
y <- x %*% beta + rnorm(60)
dendr <- cluster.snp(x = x, method = "average")
res.multisplit <- multisplit(x, y)
sign.clusters <- test.hierarchy(x, y, dendr, res.multisplit)
|
Testing the global null hypothesis..
The global null hypothesis was rejected
Testing the hierarchy
Tested a group with 60 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 26 SNPs and child 2 with 34
Tested a group with 34 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 9 SNPs and child 2 with 25
Tested a group with 9 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 3 SNPs and child 2 with 6
Tested a group with 25 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 13 SNPs and child 2 with 12
Tested a group with 6 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 4 SNPs and child 2 with 2
Tested a group with 13 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 4 SNPs and child 2 with 9
Tested a group with 2 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 1 SNPs and child 2 with 1
Tested a group with 4 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 2 SNPs and child 2 with 2
Tested a group with 2 SNPs.
The group is significant.
Testing the children of the group:
Child 1 with 1 SNPs and child 2 with 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.