Description Usage Arguments Details Value Note Author(s) See Also Examples
Plots the predicted PPI in three different ways. Depending on the type
argument it manages the specific layout settings and finally uses the plot
function of the igraph
package.
1 2 3 4 5 6 7 |
x |
An object from the class |
type |
Character string. Which graph type to plot. "ppi": plots only the predicted PPI. "hybrid": plots the hybrid network which consists of all relevant interactions from the reference species, the predicted interactions in the target species and all relevant homologous relationships. |
multiple.edges |
Logical. Is only considered if |
scores |
Logical. If |
species.colors |
Named vector, to specify the species colors. If no value is given then default colors are used. |
vertices.opacity |
Numeric value between 0 and 1 defining the opacity of the vertices. |
use.identifiers |
Logical. If |
protein.labels |
Named vector to define the labels of the vertices. If no value is given then the protein identifiers are used. The vector does not have to be complete, i.e. not each protein has to be defined. |
show.legend |
Logical. If |
vertices.coordinates |
Data frame containing the coordinates of the vertices. If no value is given
then coordinates are computed using the |
return.coordinates |
Logical. If |
tkplot |
Logical. If |
... |
Additional plotting parameters. |
The argument return.coordinates
only works correctly if
tkplot=FALSE
. If you want to get the coordinates of the tkplot device
use tkplot.getcoords
.
If return.coordinates=TRUE
the coordinates of the vertices are
returned.
If you want to export the plotted graph to postscript you have to consider
that the default font family is set to sans for vertex and edge labels.
Please change the default font family of postscript to sans before you
call the plot method: ps.options(family="sans")
.
Additionally, you have to consider that the default value for
vertices.opacity
is set to 0.8 in order to enhance the
visibility of the graph, since some edges may be hidden by the vertices.
Postscript does not support semi-transparencies. Hence, please change the
vertices.opacity
argument to 1 if you want to export the graph
using postscript.
Oliver Philipp MolBI-software@bioinformatik.uni-frankfurt.de
predictPPI
, igraph
for other plotting parameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | data(ai) #Load test data set
ppi <- Path2PPI("Autophagy induction", "Podospora anserina", "5145")
ppi <- addReference(ppi, "Homo sapiens", "9606", human.ai.proteins,
human.ai.irefindex, pa2human.ai.homologs)
ppi <- addReference(ppi, "Saccharomyces cerevisiae (S288c)", "559292",
yeast.ai.proteins, yeast.ai.irefindex,
pa2yeast.ai.homologs)
ppi <- predictPPI(ppi,h.range=c(1e-60,1e-20))
#Plot the predicted PPI with the default settings and return
#the coordinates of the vertices
set.seed(12)
coordinates <- plot(ppi, return.coordinates=TRUE)
#Plot the predicted PPI and show each underlying reference interaction.
#Use different species specific colors. To compare both graphs,
#use the coordinates computed before
plot(ppi,multiple.edges=TRUE,vertices.coordinates=coordinates)
#Plot the corresponding hybrid network with predefined species colors.
#Also define some labels for the proteins of the target species.
#Keep in mind: You can not use the data in "coordinates" since
#the hybrid network consists of more vertices than the default PPI
set.seed(40)
target.labels<-c("B2AE79"="PaTOR","B2AXK6"="PaATG1",
"B2AUW3"="PaATG17","B2AM44"="PaATG11",
"B2AQV0"="PaATG13","B2B5M3"="PaVAC8")
species.colors <- c("5145"="red","9606"="blue","559292"="green")
plot(ppi,type="hybrid",species.colors=species.colors,
protein.labels=target.labels)
|
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Search for all relevant interactions:
0%--25%--50%--75%--100%
Remove irrelevant homologs.
Search for all relevant interactions:
0%--25%--50%--75%--100%
Remove irrelevant homologs.
Begin with Homo sapiens
6 interactions processed. These lead to 5 interactions in target species.
-------------------------------
Begin with Saccharomyces cerevisiae (S288c)
15 interactions processed. These lead to 22 interactions in target species.
-------------------------------
Combine results to one single PPI.
A total of 13 putative interactions were predicted in target species.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.