Gene-environment interaction tests for a single region/gene using SSD format files

Description

Test the interaction between an environmental exposure and one region/gene on a quantitative outcome using SSD format files.

Usage

1
2
GEI.SSD.OneSet_SetIndex(SSD.INFO, SetIndex, result.prelim, Gsub.id=NULL,
MinP.adjust=NULL, ...)

Arguments

SSD.INFO

SSD format information file, output of function “Open_SSD". The sets are defined by this file.

SetIndex

Set index. From 1 to the total number of sets.

result.prelim

Output of function "GEI.prelim()".

Gsub.id

The subject id corresponding to the genotype matrix, an m dimensional vector. This is in order to match the phenotype and genotype matrix. The default is NULL, where the order is assumed to be matched with Y, X, E and time.

MinP.adjust

If the users would like to compare with the MinP test, this parameter specify the adjustment thereshold as in Gao, et al. (2008) "A multiple testing correction method for genetic association studies using correlated single nucleotide polymorphisms". Values from 0 to 1 are permitted. The default is NULL, i.e., no comparison. The value suggested by Gao, et al. (2008) is 0.95.

...

Other options of the generalized score type test. Defined same as in function "GEI.test()".

Value

p.value

P-value of the set based generalized score type test.

p.single

P-values of the incorporated single SNP analyses

p.MinP

P-value of the MinP test.

n.marker

number of tested SNPs in the SNP set.

E.df

number of tested SNPs in the SNP set.

G.df

number of tested SNPs in the SNP set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# * Since the Plink data files used here are hard to be included in a R package,
# The usage is marked by "#" to pass the package check.

# library(LGEWIS)

##############################################

# Plink data files: File.Bed, File.Bim, File.Fam
# Files defining the sets: File.SetID, File.SSD, File.Info
# For longitudinal data, outcome and covariates are saved in a separate file: Y, time, X, E.
# Preliminary work was done using function null.LGRF.

# Create the MW File
# File.Bed<-"./example.bed"
# File.Bim<-"./example.bim"
# File.Fam<-"./example.fam"
# File.SetID<-"./example.SetID"
# File.SSD<-"./example.SSD"
# File.Info<-"./example.SSD.info"

# Generate SSD file
# To use binary ped files, you have to generate SSD file first.
# If you already have a SSD file, you do not need to call this function.
# Generate_SSD_SetID(File.Bed, File.Bim, File.Fam, File.SetID, File.SSD, File.Info)

# SSD.INFO<-Open_SSD(File.SSD, File.Info)
# Number of samples
# SSD.INFO$nSample
# Number of Sets
# SSD.INFO$nSets

## Fit the null model
# Y: outcomes, n by 1 matrix where n is the total number of observations
# X: covariates, n by p matrix
# E: covariates, n by 1 matrix
# time: describe longitudinal structure, n by 2 matrix
# result.prelim<-GEI.prelim(Y,time,E,X=X)

## Test a single region
# out_single<-GEI.SSD.OneSet_SetIndex(SSD.INFO=SSD.INFO,
# SetIndex=3, result.prelim=result.prelim,MinP.adjust=0.95)

# Example result
# out_single
# $n.marker
# [1] 108

# $E.df
# [1] 22

# $G.df
# [1] 22

# $p.single
#           MAF      p.value
# SNP0254 0.098 5.920758e-01
# SNP0273 0.091 9.468959e-01
# SNP0199 0.118 4.131540e-01
# ...

# $p.MinP
# [1] 3.876731e-05

# $p.value
# [1] 0.1167991