Description Details Author(s) See Also Examples
Is designed to test for association between methylation at CpG sites across the genome and a phenotype of interest, adjusting for any relevant covariates. The package can perform standard analyses of large datasets very quickly with no need to impute the data. It can also handle mixed effects models with chip or batch entering the model as a random intercept. Also includes tools to apply quality control filters, perform permutation tests, and create QQ plots, manhattan plots, and scatterplots for individual CpG sites.
There is a tutorial for CpGassoc available at the website <genetics.emory.edu/conneely/>
Package: CpGassoc Type: Package Title: Association between Methylation and a phenotype of interest Version: 2.60 Date: 2017-05-30 Author: Barfield, R., Conneely, K., Kilaru,V Maintainer: R Barfield <barfieldrichard8@gmail.com> Description: CpGassoc is designed to test for association between methylation at CpG sites across the genome and a phenotype of interest, adjusting for any relevant covariates. The package can perform standard analyses of large datasets very quickly with no need to impute the data. It can also handle mixed effects models with chip or batch entering the model as a random intercept. CpGassoc also includes tools to apply quality control filters, perform permutation tests, and create QQ plots, manhattan plots, and scatterplots for individual CpG sites. Depends:nlme,methods Suggests:qvalue License: GPL (>= 2) |
CpGassoc is a suite of R functions designed to perform flexible analyses of methylation array data.
The two main functions are cpg.assoc
and cpg.perm
. cpg.assoc
will perform an association test
between the CpG sites and the phenotype of interest. Covariates can be added to the model, and can be
continuous or categorical in nature. cpg.assoc
allows users to set their own false discovery rate threshold,
to transform the beta values to log(beta/(1-beta)), and to subset if required. cpg.assoc can also fit a
linear mixed effects model with a single random effect to control for possible technical difference due to
batch or chip. cpg.assoc
uses the Holm method to determine significance. The user can also specify
an FDR method to determine significance based on the function p.adjust
or qvalue
. cpg.perm
performs the same tasks as cpg.assoc
followed by a permutation test on the data, repeating the analysis
multiple times after randomly permuting the main phenotype of interest. The user can
specify the seed and the number of permutations. If over one hundred permutations are performed
QQ plots can be created with empirical confidence intervals based on the permuted t-statistics.
For more information see plot.cpg.perm
. For more information on how to perform cpg.assoc
or
cpg.perm
see their corresponding help pages. CpGassoc can also perform quality control (see cpg.qc
).
Barfield, R.; Kilaru,V.; Conneely, K.
Maintainer: R. Barfield: <rbarfield01@fas.harvard.edu>
cpg.assoc
cpg.combine
cpg.perm
cpg.work
plot.cpg
scatterplot
manhattan
plot.cpg.perm
cpg.qc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ###NOTE: If you are dealing with large data, do not specify large.data=FALSE.
###The default option is true
##This will involve partitioning up the data and performing more gc() to clear up space
##Using cpg.assoc:
data(samplecpg,samplepheno,package="CpGassoc")
results<-cpg.assoc(samplecpg,samplepheno$weight,large.data=FALSE)
results
##Using cpg.perm:
Testperm<-cpg.perm(samplecpg[1:200,],samplepheno$weight,data.frame(samplepheno$Dose),
seed=2314,nperm=10,large.data=FALSE)
Testperm
#For more examples go to those two pages main help pages.
|
Loading required package: nlme
The top ten CpG sites were:
CPG.Labels T.statistic P.value Holm.sig FDR gc.p.value
694 CpG694 3.454271 0.0006456268 FALSE 0.4318310 0.0006456268
293 CpG293 3.412320 0.0007485123 FALSE 0.4318310 0.0007485123
560 CpG560 3.313353 0.0010549618 FALSE 0.4318310 0.0010549618
148 CpG148 3.133454 0.0019286973 FALSE 0.5645412 0.0019286973
998 CpG998 -3.079596 0.0022986204 FALSE 0.5645412 0.0022986204
1059 CpG1059 -2.883525 0.0042668430 FALSE 0.7693539 0.0042668430
1182 CpG1182 -2.819710 0.0051827097 FALSE 0.7693539 0.0051827097
100 CpG100 2.787987 0.0057015107 FALSE 0.7693539 0.0057015107
751 CpG751 -2.759379 0.0062093208 FALSE 0.7693539 0.0062093208
238 CpG238 2.756367 0.0062650966 FALSE 0.7693539 0.0062650966
To access results for all 1228 CpG sites use object$results
or sort(object)$results to obtain results sorted by p-value.
General info:
Min.P.Observed Num.Cov fdr.cutoff FDR.method Phenotype chipinfo num.Holm
1 0.0006456268 0 0.05 BH weight NULL 0
num.fdr
1 0
0 sites were found significant by the Holm method
0 sites were found significant by BH method
The beta values were taken from: samplecpg
Effect sizes and standard error can be accessed using $coefficients
Other attributes are: results, Holm.sig, FDR.sig, info, indep, covariates, chip
They can be accessed using the $
The permutation P-values, number of permutations and seed:
p.value.p p.value.holm p.value.FDR nperm seed
1 0.3 1 1 10 2314
Other information:
Min.P.Observed Num.Cov fdr.cutoff FDR.method num.real.Holm num.real.fdr
1 0.001757539 1 0.05 BH 0 0
The top ten CpG sites were:
CPG.Labels T.statistic P.value Holm.sig FDR gc.p.value
148 CpG148 3.161818 0.001757539 FALSE 0.3515077 0.007601939
100 CpG100 2.840484 0.004868057 FALSE 0.4868057 0.016341542
52 CpG52 -2.416828 0.016358966 FALSE 0.7097533 0.040732697
85 CpG85 2.345373 0.019775082 FALSE 0.7097533 0.047009419
3 CpG3 -2.288648 0.022918149 FALSE 0.7097533 0.052558145
24 CpG24 -2.090349 0.037576980 FALSE 0.7097533 0.076452721
72 CpG72 -2.061676 0.040252077 FALSE 0.7097533 0.080551514
70 CpG70 -2.051444 0.041245342 FALSE 0.7097533 0.082057103
178 CpG178 -2.042358 0.042144711 FALSE 0.7097533 0.083413116
153 CpG153 -2.025254 0.043883038 FALSE 0.7097533 0.086015232
To access results for all 200 CpG sites use object$results
or sort(object)$results to obtain results sorted by p-value.
0 sites were found significant by the Holm method
0 sites were found significant by BH method
The beta values were taken from: samplecpg[1:200, ]
Other attributes are: permutation.matrix, perm.p.values, gc.permutation.matrix, results, Holm.sig ,
FDR.sig, info, indep, covariates, chip, coefficients.
They can be accessed using the $
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.