glmm.EC function. In each test, the glmer function from
package lme4 is used.
glmm.binped(phenfile,genfile,pedfile,phen,covars=NULL,
mafRange=c(0,0.05),chr,snpinfoRdata,sep.ped=",",sep.phe=",",
sep.gen=" ",aggregateBy="SKATgene",maf.file,
snp.cor,ssq.beta.wts=c(1,25),singleSNP.outfile=F)test.dat phenfile mafRange phen and singleSNP,
contains columns: gene, Name, maf, ntotal, nmiss,
maf_ntotal, beta, se, Z, remark, p,
MAC, n0, n1, and n2. A burden test result file,
named with phen and T/MB for Li & Leal 2008/Madsen & Browning 2009
respectively, contains columns: gene, beta, se, Z,
cmafTotal, cmafUsed, nsnpsTotal, nsnpsUsed, nmiss,
remark, and p. A SSQ test result file, named with phen and SSQ,
contains columns: gene, SSQ, cmafTotal, cmafUsed,
nsnpsTotal, nsnpsUsed, nmiss, df, and p. A
generated RData that is a list that contains scores, cov, n,
maf and sey for each gene with gene names being the names of the
list. Note maf in RData is MAF based on ntotal.ntotalntotalbetamaf_ntotal of SNPs in a genemaf_ntotal of SNPs selected with mafRange
in a gene for burden tests or SSQ testbeta/se^2 in output RData, where beta and
se are vectorsntotal in a gene in output RDataglmm.binped function reads in and merges phenotype, genotype, and
pedigree files to perform single SNP analysis, two burden tests (weight=1 for
Li & Leal 2008; weight=1/(MAF)/(1-MAF) for Madsen & Browning 2009), and one sum
of squares (SSQ) test (Wei 2009) using GLMM with logistic link that treats each
pedigree as a cluster as implemented in glmer function in lme4 R
package and to output an RData that is computed based on single SNP results and
that is compatible with seqMeta for conducting meta-analysis. For burden
tests and SSQ test, SNPs genotypes/results are aggregated by aggregateBy
(default = "SKATgene") using SNPs selected according to user specified
mafRange within each gene (by default). genfile contains unique
individual numerical id and genotype data on a chromosome, with the column names
being "id" and SNP names. For each SNP, the genotype data should be coded as
0, 1, 2 indicating the numbers of the coded alleles. The SNP name in genotype
file should not have any dash, '-' and other special characters(dots and
underscores are OK). phenfile contains unique individual id, phenotype
and covariates data, with the column names being "id" and phenotype and
covaraite names. pedfile contains pedigree informaion, with the column
names being "famid","id","fa","mo","sex". Wald chi-square test is used in all
genetic association tests.
Li, B. and Leal, S. M (2008). Methods for Detecting Associations with Rare Variants for Common Diseases: Application to Analysis of Sequence Data. Am J Hum Genet, 83(3), 311-321.
Madsen, B. E. and Browning, S. R (2009). A Groupwise Association Test for Rare Mutations Using a Weighted Sum Statistic. PLoS Genet, 5(2) e1000384.
Wei P (2009). Asymptotic Tests of Association with Multiple SNPs in Linkage Disequilibrium. Genet Epidemiol, 33(6), 497-507.
## Not run:
# glmm.binped(genfile="EC_chr1.txt",phenfile="trait1.csv",pedfile="ped.csv",
# phen="trait1",covars=c("age"),sep.ped=",",sep.phe=",",sep.gen=" ",
# mafRange=c(0,0.01),chr=1,snpinfoRdata="SNPinfo_EC.RData",aggregateBy="SKATgene",
# maf.file="EC_MAF.csv",snp.cor="EC_SNPcor.RData",ssq.beta.wts=c(1,25))
# ## End(Not run)
Run the code above in your browser using DataLab