GenCAT: Running GenCAT

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

View source: R/GenCAT_functions.R

Description

This function runs the GenCAT approach on a data frame of SNP level test statistics.

Usage

1
2
GenCAT(SNPdata, genoData, snpInfo, pcCutoff = 0.95, 
workers = getOption("mc.cores", 2L))

Arguments

SNPdata

A data table containing SNP level test statistics, chromsome, class, and allele assignment. This must have the column names 'SNP', 'testStat', 'chr', 'class', 'effect_allele', and 'other_allele'.

genoData

This is an object of class 'SnpMatrix' with genotype data to run GenCAT

snpInfo

If 'genoData' is provided this is a table which includes SNP data with columns 'chr', 'SNP', 'position', 'A1', and 'A2'."

pcCutoff

Threshold for the cumulative poportion of eigenvalues given by eigen() for the SNP-wise correlation matrix. By default this is set to 0.95.

workers

Specifies the number of parallel processes to run.

Details

Reference population should be representative of population used to generate SNP level test statistics. Genotype data is input using the arguments genoData and snpInfo. The former should be of class SnpMatrix. The latter should be a data frame similar to that of the map element of the list created by the read.plink or read.pedfile functions from the snpStats package.

The pcCutoff argument specifies the proportion of variability in the SNP wise correlation matrix used in the eigen decomposition and estimation of independent test statistics.

Value

An object of class "GenCATtest" with five elements.

GenCAT

A data frame containing GenCAT test results.

Used

A data frame containing SNP information for SNPs used in GenCAT analysis

notFound

A data frame containing SNP information for SNPs for which there was no reference genotype data

unMatched

A data frame containing SNP information for SNPs in which an allele assignment wasn't in reference genotype

TransStats

A data frame containing transformed test statistics from eigen decomposition of each class

Author(s)

Eric Reed, Sara Nunez, Jing Qian, Andrea Foulkes

References

Qian J, Nunez S, Reed E, Reilly MP, Foulkes AS (2016) <DOI:10.1371/journal.pone.0148218> A Simple Test of Class-Level Genetic Association Can Reveal Novel Cardiometabolic Trait Loci. PLoS ONE 11(2): e0148218.

See Also

snpStats

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
###############
#Running GenCAT
###############
data("CardioMapped")

#Subset CardioMapped to decrease CPU time
CardioMappedSub<-CardioMapped[CardioMapped$chr < 15,]
set.seed(1)
CardioMappedSub<-CardioMappedSub[sample(1:nrow(CardioMappedSub), 100),]

print(head(CardioMappedSub))

library(snpStats)
data('geno')

genoData<-geno$genotypes
snpInfo<-geno$map

print(str(genoData))

colnames(snpInfo)<-c('chr', 'SNP', 'gen.dist', 'position', 'A1', 'A2')
print(head(snpInfo))

GenCATtest <- GenCAT(CardioMappedSub, genoData=genoData, snpInfo = snpInfo)

  

GenCAT documentation built on May 30, 2017, 1:31 a.m.