plot.Path2PPI: Plots the predicted PPI

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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.

Usage

1
2
3
4
5
6
7
## S3 method for class 'Path2PPI'
plot(x, type = "ppi", multiple.edges = FALSE, 
              scores = FALSE, species.colors = c(), 
              vertices.opacity=0.8, use.identifiers=FALSE,
              protein.labels = NA, show.legend = TRUE, 
              vertices.coordinates = NA, return.coordinates = FALSE, 
              tkplot=FALSE,...)

Arguments

x

An object from the class Path2PPI where the PPI network already has been predicted.

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 type="ppi". If TRUE then each reference interaction is depicted in the species-specific color (raw mode), in contrast, if set to FALSE only the finalized / combined interactions are depicted.

scores

Logical. If TRUE the edge scores will be shown.

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 TRUE then only the proteins identifiers are used as the vertex labels.

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 TRUE then a legend is depicted.

vertices.coordinates

Data frame containing the coordinates of the vertices. If no value is given then coordinates are computed using the layout.auto function.

return.coordinates

Logical. If TRUE the coordinates of the vertices are returned.

tkplot

Logical. If TRUE the graph is drawn in the interactive graph drawing facility tkplot.

...

Additional plotting parameters.

Details

The argument return.coordinates only works correctly if tkplot=FALSE. If you want to get the coordinates of the tkplot device use tkplot.getcoords.

Value

If return.coordinates=TRUE the coordinates of the vertices are returned.

Note

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.

Author(s)

Oliver Philipp MolBI-software@bioinformatik.uni-frankfurt.de

See Also

predictPPI, igraph for other plotting parameters

Examples

 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)

Example output

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.

Path2PPI documentation built on Nov. 8, 2020, 5:38 p.m.