GxE.scan: GxE analysis for an array of SNPs

Description Usage Arguments Details Value See Also Examples

View source: R/wga_stream.GxE.R

Description

Performs analyses for a scan of SNPs.

Usage

1

Arguments

snp.list

See snp.list. No default.

pheno.list

See pheno.list. No default.

op

See details for this list of options. The default is NULL.

Details

For proper anlaysis of imputed SNPs, the only option that should be used is model=3 (snp.score)

See the vignette vignette_GxE for examples of running this function. To use this function, the data must be stored in files as defined in snp.list and pheno.list. See the examples on how to create these lists. The format of the genotype data must be a format where the SNPs are rows (snp.list$format="impute", "ldat", "tped") or a format where either the GLU software or PLINK software can read and transform the data. Options for setting the path to GLU or PLINK are found in snp.list. The genotype data is read in from the file snp.list$file, and the variables for the main effects and interactions are read in from the file pheno.list$file. The subjects to be included in the analysis are the subjects with matching ids in the phenotype and genotype data.

Users can easily run their own customized scan by setting the option model to 0 and setting the option scan.func to their own scan function. The vignette "vignette_GxE" has examples of user-defined scans.

Options list op: Below are the names for the options list op. All names have default values if they are not specified.

Advanced options:

Output variable names: The output file will contain columns for the SNP, MAF, missing rate, and genotype frequency counts. Other columns are specific for the specified model. A column denoted by *.Inter.Pvalue is a p-value from a Wald test involving the interaction terms of the SNP and exposure variables. A column denoted by *.Omnibus.Pvalue is a p-value from a Wald test involving the main effect of the SNP and interaction terms of the SNP and exposure variables.

Value

The name of the output file containing the results. See the option out.file. See details for the column names in the output file.

See Also

GxE.scan.partition, GxE.scan.combine

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
 # Define the list for the genotype data. 
 snp.list <- list()
 snp.list$file <- system.file("sampleData", "geno_data.ldat.gz", package="CGEN")
 snp.list$file.type <- 7    
 snp.list$delimiter <- "\t"
 snp.list$in.miss <- "  "
 
 # Only process the first 5 SNPs in the file
 snp.list$start.vec <- 1
 snp.list$stop.vec <- 6

 # Define pheno.list
 pheno.list <- list()
 pheno.list$file <- system.file("sampleData", "Xdata.txt", package="CGEN")
 pheno.list$file.type <- 3
 pheno.list$delimiter <- "\t"
 pheno.list$id.var <- "id"

 # Define the variables in the model
 pheno.list$response.var <- "case.control"
 pheno.list$strata.var <- "ethnic.group"
 pheno.list$main.vars <- c("age.group", "oral.years", "n.children")
 pheno.list$int.vars <- "n.children"

 # Define the list of options
 op <- list(out.file="out.txt")

 # For this model, all variables are continuous
 # temp <- GxE.scan(snp.list, pheno.list, op=op)

CGEN documentation built on April 28, 2020, 8:08 p.m.