cpg.perm.object: Methods for object of class '"cpg.perm"'.

Description Usage Arguments Note Author(s) See Also Examples

Description

Methods and extra functions for class "cpg.perm". plot.cpg.perm creates a QQ plot based on the association p-values or t-statistics from the function cpg.perm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  ## S3 method for class 'cpg.perm'
plot(x, save.plot = NULL, file.type = "pdf", popup.pdf = FALSE,
  main.title = NULL, eps.size = c(5, 5), tplot = FALSE, perm.ci = TRUE, classic = TRUE,
  gc.p.val = FALSE, gcdisplay = FALSE, ...)

  ## S3 method for class 'cpg.perm'
summary(object,...)

  ## S3 method for class 'cpg.perm'
print(x,...)

  ## S3 method for class 'cpg.perm'
sort(x,decreasing,...)

Arguments

x

Output from cpg.perm. Of class "cpg.perm".

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 "pdf" or "eps". Selecting file.type="eps" will result in publication quality editable postscript files that can be opened by Adobe Illustrator or Photoshop.

popup.pdf

TRUE or FALSE. If creating a pdf file, this indicates if the plot should appear in a popup window as well. If running in a cluster-like environment, best to leave FALSE.

main.title

Main title to be put on the graph. If NULL one based on the analysis will be used

eps.size

Vector indicating the size of .eps file (if creating one). Correponds to the options horizontal and height in the postscript function.

tplot

Logical. If TRUE, ordered t-statistics will be plotted against their expected quanties. If FALSE (default), -log(p) will be plotted. If indep is a class variable this option will be ignored.

perm.ci

Logical. If TRUE, the confidence intervals computed will be from the permutated values, otherwise will be based on the theoretical values.

classic

Logical. If TRUE, a classic qq-plot will be generated, with all p-values plotted against predicted values (including significant). If FALSE Holm-significant CpG sites will not be used to compute expected quantiles and will be plotted separately.

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 "cpg.perm" from "cpg.perm".

decreasing

logical. Should the sort be increasing or decreasing? Not available for partial sorting.

...

Arguments to be passed to methods, such as graphical parameters.

Note

Empirical confidence intervals will be computed only if there are a hundred or more permutations. Otherwise the theoretical confidence intervals will be plotted.

Author(s)

Barfield, R.; Kilaru,V.; Conneely, K.
Maintainer: R. Barfield: <rbarfield01@fas.harvard.edu>

See Also

cpg.perm plot.cpg scatterplot manhattan cpg.assoc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(samplecpg,samplepheno,package="CpGassoc")
##We will do the analysis on a subset to save time
###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
#The qq plot:
Testperm<-cpg.perm(samplecpg[1:300,],samplepheno$weight,seed=2314,nperm=10,large.data=FALSE)
plot(Testperm)
#The t-statistic plot from cpg.perm has confidence intervals since we were allowed 
#to perform permutations on the T-values.
plot(Testperm,tplot=TRUE)
#If there was 100 or more permutations, there would be emperical confidence intervals.

#Getting an example of the non classic QQ plot
plot(Testperm,classic=FALSE)


###Now for Sort
head(sort(Testperm)$results)
head(Testperm$results)

CpGassoc documentation built on May 1, 2019, 8:24 p.m.