plot3CPETRes-methods {R3CPET} | R Documentation |
This method enables the user the generate different types of plots to visualize the results.
## S4 method for signature 'ChromMaintainers' plot3CPETRes(object, path="", W=14, H=7 , type=c("heatmap","clusters","curve","avgCurve","netSim", "networks"), byEdge=TRUE, layoutfct=layout.kamada.kawai, ...)
object |
(Required) a |
path |
(optional) path where to save the plots should be |
W |
(optional) The width of the plot in the pdf file.by default it is 14 inch |
H |
(optional) The Height of the plot in the pdf file.by default it is 7 inch |
type |
type of the plot to generate. It can support the following values ((default: "heatmap")):
|
byEdge |
(optional) if |
layoutfct |
(optional) The graph layout algorithm to use. by default the |
... |
options for future use. |
Different types of values are returned depending on the type of the plot selected.
"heatmap"
returns a list generated by the pheatmap
method, however it is always empty.
"clusters","curve","avgCurve"
returns a list describing the number of plots per row and column.
"netSim"
returns a list that contains a ggplot2 object and the similarity matrix
"networks"
returns a list of ggplot2 objects, one per network.
Mohamed Nadhir Djekidel (nde12@mails.tsinghua.edu.cn)
## get the different datasets path petFile <- file.path(system.file("example",package="R3CPET"),"HepG2_interactions.txt") tfbsFile <- file.path(system.file("example",package="R3CPET"),"HepG2_TF.txt.gz") ## Not run: data(RPKMS) x <- ChiapetExperimentData(pet = petFile, tfbs= tfbsFile, IsBed = FALSE, ppiType="HPRD", filter= TRUE) ## build the different indexes x <- createIndexes(x) ## build networks connecting each interacting regions nets<- buildNetworks(x) ## infer the networks hlda<- InferNetworks(nets) ## cluster results hlda<- clusterInteractions(hlda) ## plot a heatmap plot3CPETRes(hlda,type="heatmap") ## plot clusters pair-wise scatter plots plot3CPETRes(hlda,type="clusters") ## enrichment plot for the elements in each network plot3CPETRes(hlda,type="curve") ## average enrichment plot for the elements in each network plot3CPETRes(hlda,type="avgCurve") ## heatmap showing the similarity between the different network plot3CPETRes(hlda,type="netSim") ## plot all the networks in the file "AllGraphs.pdf" nets_plot <- plot3CPETRes(hlda,type="networks") ## plot one of the networks plot(nets_plot[[3]]) ## End(Not run)