lme.batch {GWAF} | R Documentation |
Fit linear mixed effect model to test association between a continuous phenotype
and all SNPs in a genotype file with user specified genetic model. The SNP genotype is treated
as fixed effects, and a random effect correlated according to degree of relatedness within a
family is also fitted.
In each trait-SNP assocaition test, the lmekin()
function which is modified from
the same named function in package kinship
is used.
lme.batch(phenfile, genfile, pedfile, phen, kinmat, model="a", outfile, covars=NULL, col.names=T, sep.ped=",", sep.phe=",", sep.gen=",")
genfile |
a character string naming the genotype file for reading (see format requirement in details) |
phenfile |
a character string naming the phenotype file for reading (see format requirement in details) |
pedfile |
a character string naming the pedigree file for reading (see format requirement in details) |
outfile |
a character string naming the result file for writing |
phen |
a character string for a phenotype name in phenfile |
covars |
a character vector for covariates in phenfile |
model |
a single character of 'a','d','g', or 'r', with 'a'=additive, 'd'=dominant, 'g'=general and 'r'=recessive models |
kinmat |
a character string naming the file where kinship coefficient matrix is kept |
col.names |
a logical value indicating whether the output file should contain column names |
sep.ped |
the field separator character for pedigree file |
sep.phe |
the field separator character for phenotype file |
sep.gen |
the field separator character for genotype file |
The lme.batch
function first reads in and merges phenotype-covariates, genotype
and pedigree files, then tests the association of phen
against all SNPs in genfile
.
genfile
contains unique individual id and genotype data, 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 less frequent
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". In all files, missing value should be an empty space, except missing parental id in pedfile
.
SNPs with low genotype counts (especially minor allele homozygote) may be omitted
or analyzed with dominant model. The 'lme.batch' function fits linear mixed effects (LME) model using
with 'lme.batch' function from GWAF package and a modified 'lmekin' function from kinship
package.
No value is returned. Instead, results are written to outfile
.
When the genetic model is 'a', 'd' or 'r', the result includes the following columns.
When the genetic model is 'g', beta
and se
are replaced with beta10
,
beta20
,beta21
,se10
,se20
,se21
.
phen |
phenotype name |
snp |
SNP name |
n0 |
the number of individuals with 0 copy of minor alleles |
n1 |
the number of individuals with 1 copy of minor alleles |
n2 |
the number of individuals with 2 copies of minor alleles |
h2q |
the portion of phenotypic variation explained by the SNP |
beta |
regression coefficient of SNP covariate |
se |
standard error of beta |
chisq |
Chi-square statistic for testing beta not equal to zero |
df |
degree of freedom of the Chi-square statistic |
model |
model actually used in the analysis |
pval |
p-value of the chi-square statistic |
|
|
beta10 |
regression coefficient of genotype with 1 copy of minor allele vs. that with 0 copy |
beta20 |
regression coefficient of genotype with 2 copy of minor allele vs. that with 0 copy |
beta21 |
regression coefficient of genotype with 2 copy of minor allele vs. that with 1 copy |
se10 |
standard error of beta10 |
se20 |
standard error of beta20 |
se21 |
standard error of beta21 |
Qiong Yang <qyang@bu.edu> and Ming-Huei Chen <mhchen@bu.edu>
kinship package: mixed-effects Cox models, sparse matrices, and modeling data from large pedigrees. Beth Atkinson (atkinson@mayo.edu) for pedigree functions.Terry Therneau (therneau@mayo.edu) for all other functions. 2007. Ref Type: Computer Program http://cran.r-project.org/.
Abecasis, G. R., Cardon, L. R., Cookson, W. O., Sham, P. C., & Cherny, S. S. Association analysis in a variance components framework. Genet Epidemiol, 21 Suppl 1, S341-S346 (2001).