lme.EC
function. In each test, the lmekin function from package
coxme is used.
lme.ped(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 (p-value from LRT), 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 RDatalme.ped function reads in and merges phenotype, genotype,
and pedigree files, and creates a relationship coefficient matrix using
pedfile and kinship2 package to perform single SNP analysis,
two burden tests (weight=1 for Li & Leal 2008; weight=1/(MAF)/(1-MAF) for
Madsen & Browning 2009), one sum of squares (SSQ) test (Wei 2009) using
a LME model as implemented in lmekin function in coxme 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.
Abecasis, G. R., Cardon, L. R., Cookson, W. O., Sham, P. C., & Cherny, S. S (2001). Association analysis in a variance components framework. Genet Epidemiol, 21 Suppl 1, S341-S346.
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:
# lme.ped(genfile="EC_chr1.txt",phenfile="trait1.csv",pedfile="ped.csv",
# phen="trait1",covars=NULL,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