Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sysbio-curie/Neko
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Jul 24, 2024
2 parents bd1f924 + 117d972 commit a2310dc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 28 deletions.
36 changes: 22 additions & 14 deletions docs/src/notebooks/9-Recreating_famous_pathways.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "0dc40388-8f54-4433-aa81-9dc643697c76",
"metadata": {},
"source": [
"# Re-creating famous pathways from SIGNOR and WIKIPATHWAYS using NeKo"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -18,7 +26,7 @@
"id": "19dc89d3-203b-479a-9d46-3b7846c720bb",
"metadata": {},
"source": [
"# First test: retrieving the MTOR Signaling from Signor using NeKo "
"## 1) Retrieving the MTOR Signaling from Signor using NeKo "
]
},
{
Expand Down Expand Up @@ -90,9 +98,9 @@
"id": "d6049069-ed6f-40ae-bbc3-c65c59ee095e",
"metadata": {},
"source": [
"### Let's compare the function commplete_connection (based on the Reciprocal Pathway Extender algorithm) with the function connect_radially (based on the Iterative Neighbor Expansion ). \n",
"### We are going to create two neko_net, and apply to each of them one of the two functions. \n",
"### Finally, we are going to compare the resulting networks."
"Let's compare the function commplete_connection (based on the Reciprocal Pathway Extender algorithm) with the function connect_radially (based on the Iterative Neighbor Expansion ). \n",
"We are going to create two neko_net, and apply to each of them one of the two functions. \n",
"Finally, we are going to compare the resulting networks."
]
},
{
Expand Down Expand Up @@ -176,7 +184,7 @@
"id": "2a80e34b-cb9c-4caf-962f-4738da608fb6",
"metadata": {},
"source": [
"### Now let's visualize the network:"
"Now let's visualize the network:"
]
},
{
Expand Down Expand Up @@ -208,8 +216,8 @@
"id": "e2024355-1443-40f6-b529-8c94f80d040e",
"metadata": {},
"source": [
"### Let's compare the Networks. We will use JUST those nodes in signor that are not complexes or protein families (so we excluded all those nodes that starts with \"SIGNOR_\").\n",
"### At the following link you can find the full MTOR pathway from SIGNOR: https://signor.uniroma2.it/pathway_browser.php?beta=3.0&organism=&pathway_list=SIGNOR-MS&x=13&y=13"
"Let's compare the Networks. We will use JUST those nodes in signor that are not complexes or protein families (so we excluded all those nodes that starts with \"SIGNOR_\").\n",
"At the following link you can find the full MTOR pathway from SIGNOR: https://signor.uniroma2.it/pathway_browser.php?beta=3.0&organism=&pathway_list=SIGNOR-MS&x=13&y=13"
]
},
{
Expand Down Expand Up @@ -263,7 +271,7 @@
"id": "8562a1af-20b7-492b-add2-f56f3da93b80",
"metadata": {},
"source": [
"### The first consideration to do is that the RPE algorithm, is way faster than the INE one (529 ms vs 9.73 s). Despite being slower, the INE algorithm, provided a much bigger network (15 nodes vs 44, 84 edges vs 259)"
"The first consideration to do is that the RPE algorithm, is way faster than the INE one (529 ms vs 9.73 s). Despite being slower, the INE algorithm, provided a much bigger network (15 nodes vs 44, 84 edges vs 259)"
]
},
{
Expand Down Expand Up @@ -361,15 +369,15 @@
"id": "98534d1b-0922-491d-8c26-2f8439c5dae7",
"metadata": {},
"source": [
"### As expected, due to the network size, the INE algorithm managed to capture more genes belonging to the MTOR pathway compared to the RPE algorithm. This was expected also because the RPE algorithm aims at finding the minimal set of genes that can connect all the seed nodes given by the user, while the INE algorithm does not take into account the shortest paths, but homogeneously explores the surroundings."
"As expected, due to the network size, the INE algorithm managed to capture more genes belonging to the MTOR pathway compared to the RPE algorithm. This was expected also because the RPE algorithm aims at finding the minimal set of genes that can connect all the seed nodes given by the user, while the INE algorithm does not take into account the shortest paths, but homogeneously explores the surroundings."
]
},
{
"cell_type": "markdown",
"id": "c9834d56-3487-484e-8f9b-24f0601b5af0",
"metadata": {},
"source": [
"# Test 2: retrieving the EGF/EGFR pathway (source: wikipathway) using Omnipath"
"## 2) Retrieving the EGF/EGFR pathway (source: wikipathway) using Omnipath"
]
},
{
Expand Down Expand Up @@ -740,7 +748,7 @@
"id": "14468b0d-9972-4e6e-8e8d-e8d9fe2d8f33",
"metadata": {},
"source": [
"### Once again, now that we have created the NeKo network, let's use the RPE and INE algorithm to retrieve (hopefully) the full EGF/EGFR pathway. \n",
"Once again, now that we have created the NeKo network, let's use the RPE and INE algorithm to retrieve (hopefully) the full EGF/EGFR pathway. \n",
"\n",
"**To Notice!**\n",
"\n",
Expand Down Expand Up @@ -816,7 +824,7 @@
"id": "3dfda316-09fb-48ee-a509-451fbdecdd4f",
"metadata": {},
"source": [
"### As we did previously, let's compare network's size and check if we found nodes beloning to the EGF/EGFR pathway from wikipathway"
"As we did previously, let's compare network's size and check if we found nodes beloning to the EGF/EGFR pathway from wikipathway"
]
},
{
Expand Down Expand Up @@ -960,9 +968,9 @@
"id": "f0cc73cc-35fe-423d-bdf8-caf91432feb9",
"metadata": {},
"source": [
"### Once more, the INE captured better the pathway composition, recovering 40-50% of the genes in the EGF/EGFR pathway from wikipathways (by starting from 10%). This time, INE performed better than RPE. The reason for this resides within the database composition. The AllOmnipathInteraction database contains tons of interaction, which means, many possibilities to go from gene A to gene B in the shortest path possible (with max len = 3). On the other hand, INE runs with max_len = 1, so it just collects all the possible neighbors of the nodes, without looking for extended extra pathways. \n",
"Once more, the INE captured better the pathway composition, recovering 40-50% of the genes in the EGF/EGFR pathway from wikipathways (by starting from 10%). This time, INE performed better than RPE. The reason for this resides within the database composition. The AllOmnipathInteraction database contains tons of interaction, which means, many possibilities to go from gene A to gene B in the shortest path possible (with max len = 3). On the other hand, INE runs with max_len = 1, so it just collects all the possible neighbors of the nodes, without looking for extended extra pathways. \n",
"\n",
"### Please remember that the aim of the RPE algorithm is to reduce as much as possible the average network distance. On the other hand, the INE algorithm does not care about it."
"Please remember that the aim of the RPE algorithm is to reduce as much as possible the average network distance. On the other hand, the INE algorithm does not care about it."
]
},
{
Expand Down
36 changes: 22 additions & 14 deletions notebooks/9-Recreating_famous_pathways.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "0dc40388-8f54-4433-aa81-9dc643697c76",
"metadata": {},
"source": [
"# Re-creating famous pathways from SIGNOR and WIKIPATHWAYS using NeKo"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -18,7 +26,7 @@
"id": "19dc89d3-203b-479a-9d46-3b7846c720bb",
"metadata": {},
"source": [
"# First test: retrieving the MTOR Signaling from Signor using NeKo "
"## 1) Retrieving the MTOR Signaling from Signor using NeKo "
]
},
{
Expand Down Expand Up @@ -90,9 +98,9 @@
"id": "d6049069-ed6f-40ae-bbc3-c65c59ee095e",
"metadata": {},
"source": [
"### Let's compare the function commplete_connection (based on the Reciprocal Pathway Extender algorithm) with the function connect_radially (based on the Iterative Neighbor Expansion ). \n",
"### We are going to create two neko_net, and apply to each of them one of the two functions. \n",
"### Finally, we are going to compare the resulting networks."
"Let's compare the function commplete_connection (based on the Reciprocal Pathway Extender algorithm) with the function connect_radially (based on the Iterative Neighbor Expansion ). \n",
"We are going to create two neko_net, and apply to each of them one of the two functions. \n",
"Finally, we are going to compare the resulting networks."
]
},
{
Expand Down Expand Up @@ -176,7 +184,7 @@
"id": "2a80e34b-cb9c-4caf-962f-4738da608fb6",
"metadata": {},
"source": [
"### Now let's visualize the network:"
"Now let's visualize the network:"
]
},
{
Expand Down Expand Up @@ -208,8 +216,8 @@
"id": "e2024355-1443-40f6-b529-8c94f80d040e",
"metadata": {},
"source": [
"### Let's compare the Networks. We will use JUST those nodes in signor that are not complexes or protein families (so we excluded all those nodes that starts with \"SIGNOR_\").\n",
"### At the following link you can find the full MTOR pathway from SIGNOR: https://signor.uniroma2.it/pathway_browser.php?beta=3.0&organism=&pathway_list=SIGNOR-MS&x=13&y=13"
"Let's compare the Networks. We will use JUST those nodes in signor that are not complexes or protein families (so we excluded all those nodes that starts with \"SIGNOR_\").\n",
"At the following link you can find the full MTOR pathway from SIGNOR: https://signor.uniroma2.it/pathway_browser.php?beta=3.0&organism=&pathway_list=SIGNOR-MS&x=13&y=13"
]
},
{
Expand Down Expand Up @@ -263,7 +271,7 @@
"id": "8562a1af-20b7-492b-add2-f56f3da93b80",
"metadata": {},
"source": [
"### The first consideration to do is that the RPE algorithm, is way faster than the INE one (529 ms vs 9.73 s). Despite being slower, the INE algorithm, provided a much bigger network (15 nodes vs 44, 84 edges vs 259)"
"The first consideration to do is that the RPE algorithm, is way faster than the INE one (529 ms vs 9.73 s). Despite being slower, the INE algorithm, provided a much bigger network (15 nodes vs 44, 84 edges vs 259)"
]
},
{
Expand Down Expand Up @@ -361,15 +369,15 @@
"id": "98534d1b-0922-491d-8c26-2f8439c5dae7",
"metadata": {},
"source": [
"### As expected, due to the network size, the INE algorithm managed to capture more genes belonging to the MTOR pathway compared to the RPE algorithm. This was expected also because the RPE algorithm aims at finding the minimal set of genes that can connect all the seed nodes given by the user, while the INE algorithm does not take into account the shortest paths, but homogeneously explores the surroundings."
"As expected, due to the network size, the INE algorithm managed to capture more genes belonging to the MTOR pathway compared to the RPE algorithm. This was expected also because the RPE algorithm aims at finding the minimal set of genes that can connect all the seed nodes given by the user, while the INE algorithm does not take into account the shortest paths, but homogeneously explores the surroundings."
]
},
{
"cell_type": "markdown",
"id": "c9834d56-3487-484e-8f9b-24f0601b5af0",
"metadata": {},
"source": [
"# Test 2: retrieving the EGF/EGFR pathway (source: wikipathway) using Omnipath"
"## 2) Retrieving the EGF/EGFR pathway (source: wikipathway) using Omnipath"
]
},
{
Expand Down Expand Up @@ -740,7 +748,7 @@
"id": "14468b0d-9972-4e6e-8e8d-e8d9fe2d8f33",
"metadata": {},
"source": [
"### Once again, now that we have created the NeKo network, let's use the RPE and INE algorithm to retrieve (hopefully) the full EGF/EGFR pathway. \n",
"Once again, now that we have created the NeKo network, let's use the RPE and INE algorithm to retrieve (hopefully) the full EGF/EGFR pathway. \n",
"\n",
"**To Notice!**\n",
"\n",
Expand Down Expand Up @@ -816,7 +824,7 @@
"id": "3dfda316-09fb-48ee-a509-451fbdecdd4f",
"metadata": {},
"source": [
"### As we did previously, let's compare network's size and check if we found nodes beloning to the EGF/EGFR pathway from wikipathway"
"As we did previously, let's compare network's size and check if we found nodes beloning to the EGF/EGFR pathway from wikipathway"
]
},
{
Expand Down Expand Up @@ -960,9 +968,9 @@
"id": "f0cc73cc-35fe-423d-bdf8-caf91432feb9",
"metadata": {},
"source": [
"### Once more, the INE captured better the pathway composition, recovering 40-50% of the genes in the EGF/EGFR pathway from wikipathways (by starting from 10%). This time, INE performed better than RPE. The reason for this resides within the database composition. The AllOmnipathInteraction database contains tons of interaction, which means, many possibilities to go from gene A to gene B in the shortest path possible (with max len = 3). On the other hand, INE runs with max_len = 1, so it just collects all the possible neighbors of the nodes, without looking for extended extra pathways. \n",
"Once more, the INE captured better the pathway composition, recovering 40-50% of the genes in the EGF/EGFR pathway from wikipathways (by starting from 10%). This time, INE performed better than RPE. The reason for this resides within the database composition. The AllOmnipathInteraction database contains tons of interaction, which means, many possibilities to go from gene A to gene B in the shortest path possible (with max len = 3). On the other hand, INE runs with max_len = 1, so it just collects all the possible neighbors of the nodes, without looking for extended extra pathways. \n",
"\n",
"### Please remember that the aim of the RPE algorithm is to reduce as much as possible the average network distance. On the other hand, the INE algorithm does not care about it."
"Please remember that the aim of the RPE algorithm is to reduce as much as possible the average network distance. On the other hand, the INE algorithm does not care about it."
]
},
{
Expand Down

0 comments on commit a2310dc

Please sign in to comment.