Description Usage Arguments Details Author(s) See Also Examples
Plot beta values of individual CpG sites against the independent variable. Can create scatterplots and boxplots. If scatterplots the intercept will be adjusted for any covariates that were included in the model.
1 2 |
x |
Object of class |
cpg.rank |
A vector listing the rank of sites to be plotted. The rank is based on the ordered p-values. |
cpg.name |
A character vector containing the names of CpG sites to be plotted against the phenotype of interest. This option is ignored if cpg.rank is specified. |
save.plot |
Prefix of the filename for the plot(s) to be saved to. If specified, plot filenames will be created by appending this prefix to either cpg.rank or cpg.name. If not specified, plot will not be saved. |
file.type |
Type of file to be saved. Can either be |
eps.size |
Vector indicating the size of .eps file (if creating one). Correponds to horrizontal and height. |
popup.pdf |
|
beta.values |
If the object has been renamed (i.e. |
main.title |
Main title to be put on the graph. If |
... |
Arguments to be passed to methods, such as graphical parameters. |
An unlimited number of CpG sites can be selected for plotting by specifying either cpg.rank or cpg.name, as shown in the Examples below. Note that only one of these options is needed; if both are entered, cpg.rank will be used.
Barfield, R.; Kilaru,V.; Conneely, K.
Maintainer: R. Barfield: <rbarfield01@fas.harvard.edu>
cpg.assoc
plot.cpg
manhattan
cpg.perm
plot.cpg.perm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #Load the data:
data(samplecpg,samplepheno,package="CpGassoc")
###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
test<-cpg.assoc(samplecpg,samplepheno$weight,large.data=FALSE)
##Using rank, will plot the top three sites in order of significance:
scatterplot(test,c(1:3))
##Using name, specify three sites:
scatterplot(test,cpg.name=c("CpG1182","CpG1000","CpG42"))
##Plotting something that is categorical in nature:
test2<-cpg.assoc(samplecpg[1:200,],factor(samplepheno$Disease),large.data=FALSE)
scatterplot(test2,c(2),beta.values=samplecpg[1:200,])
|
Loading required package: nlme
Press enter to continue
Press enter to continue
Press enter to continue
All 3 sites plotted
Press enter to continue
Press enter to continue
Press enter to continue
All 3 sites plotted
Press enter to continue
All 1 sites plotted
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.