Description Usage Arguments Value Note Author(s) See Also Examples
Methods and extra functions for class "cpg"
.
plot.cpg
creates a QQ plot based on the association p-values or t-statistics from the function cpg.assoc
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## S3 method for class 'cpg'
plot(x, save.plot = NULL, file.type = "pdf", popup.pdf = FALSE,
tplot = FALSE, classic = TRUE,main.title = NULL, eps.size = c(5, 5),
gc.p.val = FALSE, gcdisplay = FALSE, ...)
## S3 method for class 'cpg'
summary(object,...)
## S3 method for class 'cpg'
print(x,...)
## S3 method for class 'cpg'
sort(x,decreasing,...)
|
x |
Output of class |
save.plot |
Name of the file for the plot to be saved to. If not specified, plot will not be saved. |
file.type |
Type of file to be saved. Can either be |
popup.pdf |
|
tplot |
Logical. If |
classic |
Logical. If |
main.title |
Main title to be put on the graph. If |
eps.size |
Vector indicating the size of .eps file (if creating one). Correponds to the options horizontal and height in the
|
gc.p.val |
Logical. If true, plot will use the genomic control adjusted p-values. |
gcdisplay |
Logical.If true, plot will display the genomic control value in the legend. |
object |
Output of class |
decreasing |
logical. Should the sort be increasing or decreasing? Not available for partial sorting. |
... |
Arguments to be passed to methods, such as graphical parameters. |
sort.cpg
returns an item of class "cpg"
that is sorted by p-value.
summary.cpg
creates a qq-plot based on the data, and scatterplots or boxplots for the top sites.
Plots with empirical confidence intervals based on permutation tests can be obtained from cpg.perm
.
See plot.cpg.perm
for more info.
Barfield, R.; Kilaru,V.; Conneely, K.
Maintainer: R. Barfield: <rbarfield01@fas.harvard.edu>
cpg.perm
cpg.assoc
scatterplot
manhattan
plot.cpg.perm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##Using the results from the example given in cpg.assoc.
###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
##QQ Plot:
data(samplecpg,samplepheno,package="CpGassoc")
test<-cpg.assoc(samplecpg,samplepheno$weight,large.data=FALSE)
plot(test)
##t-statistic plot:
plot(test,tplot=TRUE)
#Getting our plot:
plot(test,classic=FALSE)
##Now an example of sort
head(sort(test)$results)
##Summary
summary(test)
|
Loading required package: nlme
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
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 $
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.