wtest.snps.meth: W-test for Gene-methylation Interaction Analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/wtest.snps.meth.R

Description

Calculate cis-gene-methylation interaction of a (SNP, CpG) pair in user-defined window, and can run in a genome-wide manner. The output can be filtered by p-values, such that only sets with smaller p-value than the threshold (output.pval) will be returned.

Usage

1
2
3
wtest.snps.meth(geno, meth, y, geno.pos, meth.pos, window.size = 10000,
  hf = "default.hf", output.pval = NULL, sort = TRUE,
  which.marker = NULL)

Arguments

geno

a data frame or matrix containing genotypes in the columns and subjects in the rows. Genotypes should be coded as (0, 1, 2) or (0, 1). SNP names should be stored as column names of the data.

meth

a data frame or matrix containing methylation data in the columns. Methylation data should be recoded as (0, 1, 2) or (0, 1). Names of CpG sites should be stored as column names of the data.

y

a numeric vector of 0 or 1.

geno.pos

a data frame containing SNP names and positions in two columns.

meth.pos

a data frame containing CpG names and positions in two columns.

window.size

a numeric number specifying the size of genome distance. Interaction effects of the SNPs and CpG sites located within the size of genome distance will be evaluated exhaustively.

hf

h and f values to calculate gene-methylation interaction associations, organized as a matrix, with columns (k, h, f), k = 2 to 6.

output.pval

a p-value threshold for filtering the output. If NULL, all results will be listed; otherwise, the function will only output the results with p-values smaller than output.pval.

sort

a logical value indicating whether or not to sort the output by p-values in ascending order. Default = TRUE.

which.marker

a vector indicating the column index of a SNP-CpG pair to calculate. Default which.marker = NULL means interaction pairs located within window.size will be calculated exhaustively.

Details

Calculate cis-gene-methylation interaction of a (SNP, CpG) pair in user-defined window, and can run in a genome-wide manner. The output can be filtered by p-values, such that only sets with smaller p-value than the threshold (output.pval) will be returned.

Value

An object "wtest.snps.meth" containing:

results

The test results include: SNP name, CpG name, SNP position, CpG position, W value, k, and p-value.

hf

The h and f values used for each k in pairwise calculation, where k = 2 to 6.

Author(s)

Rui Sun, Maggie Haitian Wang

References

Maggie Haitian Wang, Rui Sun, Junfeng Guo, Haoyi Weng, Jack Lee, Inchi Hu, Pak Sham and Benny C.Y. Zee (2016). A fast and powerful W-test for pairwise epistasis testing. Nucleic Acids Research. doi:10.1093/nar/gkw347.

See Also

wtest, hf.snps.meth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(SNP.pos)
data(CpG.pos)
data(genotype)
data(methylation)
data(phenotype2)

w <- 13000

# Recode methylation data
methylation <- methylation.recode(methylation)

## Step 1. HF Calculation.
# Please note that parameter B is recommended to be greater than 400.
hf.pair <- hf.snps.meth(B = 80, geno = genotype, meth = methylation, y = phenotype2,
                        geno.pos = SNP.pos, meth.pos = CpG.pos, window.size = w)

## Step 2. Application
result <- wtest.snps.meth(geno = genotype, meth = methylation, y = phenotype2, geno.pos = SNP.pos,
                          meth.pos = CpG.pos, window.size = w, hf = hf.pair, output.pval = 0.1)

wtest documentation built on Sept. 3, 2019, 9:04 a.m.

Related to wtest.snps.meth in wtest...