Question: Pathway length in Reactome
1
gravatar for gvbarroso
3.5 years ago by
gvbarroso10
Germany
gvbarroso10 wrote:

Hello,

I am interested in extracting information about the length of specific Reactome pathways (preferably using Bioconductor).

That is, given a pathway ID, I would like to know how many links it contains. Also, if possible, I would like to know how many links point to my Entity of interest, and how many links are there after it.

I am pretty new to bioinformatics and I hope I could make myself clear.

Thanks!

R genome • 1.1k views
ADD COMMENTlink modified 3.5 years ago by Gian350 • written 3.5 years ago by gvbarroso10
4
gravatar for Gian
3.5 years ago by
Gian350
Canada
Gian350 wrote:

You can use graphite package: https://www.bioconductor.org/packages/release/bioc/html/graphite.html

For example if you want to know how many nodes and edges are in the first reactome pathway:

#load package
library(graphite)
require(igraph)
#get all reactome pathways for human
reactomedata=pathways(species = 'hsapiens','reactome')
#information about the first pathway in the list
reactomedata[[1]]
# number of nodes
length(nodes(reactomedata[[1]]))
# number of edges
dim(graphite::edges(reactomedata[[1]]))[1]

 

You can also create an igraph to calculate more topological indexes:

# builds a graphNEL
g <- pathwayGraph(reactomedata[[1]])
# create an igraph from the graphNEL object
g2=igraph.from.graphNEL(g, name = TRUE, weight = TRUE, unlist.attrs = TRUE)
# calculate diameter
diameter(g2)
# calculate transitivity/clustering coefficient
transitivity(g2)
# calculate outdegree
degree(g2,mode = 'out')
# calculate indegree
degree(g2,mode = 'in') 

 

Obviously the topological indexes will change greatly if you have a directed edges, if you want to remove self loops and so on.

 

 

ADD COMMENTlink modified 3.5 years ago • written 3.5 years ago by Gian350

Thank you so much, Gian!

That goes a long way. But I can't seem to access the topology of the network (to calculate the appropriate metrics) or the position of my gene of interest...

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by gvbarroso10

Not sure what you mean, what are the metrics that you want to calculate?

ADD REPLYlink written 3.5 years ago by Gian350

Diameter, like mentioned by Manuel Landesfeind below. And also, if possible, the in- and out-degree of a given node, as well as the clustering coefficient...

ADD REPLYlink written 3.5 years ago by gvbarroso10
1

I edited the answer to add the network topology

ADD REPLYlink written 3.5 years ago by Gian350
0
gravatar for vassialk
3.5 years ago by
vassialk190
Belarus
vassialk190 wrote:

Try Cytoscape software plugins beyond Reactome, how do you define pathway length?

ADD COMMENTlink written 3.5 years ago by vassialk190
0
gravatar for gvbarroso
3.5 years ago by
gvbarroso10
Germany
gvbarroso10 wrote:

Hi vassialk,

I am interested in hoe many links and nodes a given pathway contains. This will be my measure of "length".

ADD COMMENTlink written 3.5 years ago by gvbarroso10
1

Just a hint: what you measure is usually called the pathway/network size (i.e., number of vertices, number of edges). Because pathways often have many connections (depends on the pathway and the database) and may contain circles, etc. some people prefer to use other metrics like the diameter.

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by Manuel Landesfeind1.2k

Thank you very much for that info. Do you have any idea how I can calculate these parameters?

ADD REPLYlink written 3.5 years ago by gvbarroso10

Yepp, check Wikipedia: calculate all shortest path between each pair of nodes (hint: Floyd's algorithm), then get the length of each shortest path, the maximum length is the diameter...

PS: I am quite confident, that there is already some graph package available on CRAN/BioConductor that implements the algorithm and/or diameter calculation.

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by Manuel Landesfeind1.2k

So Reactome allows me to directly extract these informations (number of in-nodes, out-nodes, links, edges...) from the results they provide in R?

ADD REPLYlink written 3.5 years ago by gvbarroso10
1

I don't know! I rarely use Reactome and have never used R for graph theory.

I just wanted to make you aware of the other graph/network metrics...

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by Manuel Landesfeind1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1707 users visited in the last hour