Skip to content

Commit

Permalink
Revert "Adding network images to notebooks"
Browse files Browse the repository at this point in the history
This reverts commit 3020e06.
  • Loading branch information
pnavada committed Jan 20, 2024
1 parent 3020e06 commit 59f397d
Show file tree
Hide file tree
Showing 3 changed files with 286 additions and 103 deletions.
113 changes: 82 additions & 31 deletions notebooks/Case_study1_The_Tsignaling_pathway.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"cell_type": "markdown",
"id": "41a84966a70395d6",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"# Case study 2: The T signaling pathway"
Expand Down Expand Up @@ -104,7 +107,10 @@
"id": "bf3ee538-6cd3-418c-80b1-a6c3492f3a0f",
"metadata": {
"collapsed": false,
"is_executing": true
"is_executing": true,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand All @@ -116,30 +122,26 @@
"cell_type": "markdown",
"id": "231bb8431a64328e",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"This is case study 2 in this paper: Eliater: an open source software for causal query estimation from observational measurements of biomolecular networks. The Figure below is the protein signalling network (G) of the cell signaling pathway presented in (Sachs et al., 2005). It models the molecular\n",
"mechanisms and regulatory processes involved in T cell activation, proliferation, and function."
]
},
{
"cell_type": "markdown",
"source": [
"![tsginaling](../img/tsignaling.png)"
],
"metadata": {
"collapsed": false
},
"id": "282e81587c15f24a"
},
{
"cell_type": "code",
"execution_count": 3,
"id": "f2f48e7e-acb8-422c-b5a6-5f20bb845609",
"metadata": {
"collapsed": false,
"is_executing": true
"is_executing": true,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand All @@ -162,7 +164,10 @@
"cell_type": "markdown",
"id": "19295d3c869fc774",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"The observational data consisted of quantitative multivariate flow cytometry measurements of phosphorylated proteins derived from thousands of individual primary immune system cells. The cells were subjected to general stimuli meant to activate the desired paths. The distributions of measurements of individual proteins were skewed, and pairs of proteins exhibited nonlinear relationships. To account for that, the data were binned into\n",
Expand All @@ -179,7 +184,10 @@
"end_time": "2024-01-11T22:20:30.802039100Z",
"start_time": "2024-01-11T22:20:30.789457500Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand Down Expand Up @@ -314,7 +322,10 @@
"cell_type": "markdown",
"id": "bd48019f2e6dd0f8",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"## Step 1: Verify correctness of the network structure"
Expand All @@ -329,7 +340,10 @@
"end_time": "2024-01-11T22:20:39.517152700Z",
"start_time": "2024-01-11T22:20:35.354323900Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand All @@ -340,7 +354,8 @@
"\n",
"Since this is less than 30%, Eliater considers this minor and leaves the network unmodified.]\n",
"\n",
"Finished in 1.81 seconds.\n"
"Finished in 1.81 seconds.\n",
"\n"
]
},
{
Expand Down Expand Up @@ -853,7 +868,10 @@
"cell_type": "markdown",
"id": "d04980abb4ea5ded",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"Out of 35 d-separations implied by the network, six failed. As the precentage of failed tests is below 30 percent, its effect on the estimation of causal query is minor. Hence, we proceed to the next step."
Expand All @@ -863,7 +881,10 @@
"cell_type": "markdown",
"id": "ffc6d06ac551ed33",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"## Step 2: Check query identifiability\n",
Expand Down Expand Up @@ -899,7 +920,10 @@
"cell_type": "markdown",
"id": "9d1f152e662579c5",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"The query is identifiable. Hence, we can proceed to the next step."
Expand All @@ -909,7 +933,10 @@
"cell_type": "markdown",
"id": "6d43d2928ac2ff5f",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"## Step 3: Find nuisance variables and mark them as latent"
Expand All @@ -919,7 +946,10 @@
"cell_type": "markdown",
"id": "39eab800e3dca3a5",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"This function finds the nuisance variables for the input graph."
Expand All @@ -934,7 +964,10 @@
"end_time": "2024-01-11T22:20:52.112216100Z",
"start_time": "2024-01-11T22:20:52.089844600Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand All @@ -960,7 +993,10 @@
"end_time": "2024-01-11T22:20:57.007991600Z",
"start_time": "2024-01-11T22:20:57.001373500Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [],
"source": [
Expand All @@ -975,7 +1011,10 @@
"cell_type": "markdown",
"id": "1fe9e972339f1c2",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"## Step 4: Simplify the network"
Expand All @@ -985,7 +1024,10 @@
"cell_type": "markdown",
"id": "a2cd73aa0e2c6173",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"In eliater, step 3, and 4 are both combined into a single function. Hence, the following function finds the nuisance variable (step 3), marks them as latent and then applies Evan's simplification rules (Step 4) to remove the nuisance variables. As a result, running the 'find_nuisance_variables' and 'mark_nuisance_variables_as_latent' functions is not necessary to get the value of step 4. However, we called them to illustrate the results. The new graph obtained in step 4 does not contain nuisance variables. "
Expand All @@ -1000,7 +1042,10 @@
"end_time": "2024-01-11T22:21:02.953136Z",
"start_time": "2024-01-11T22:21:02.939413200Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand All @@ -1023,7 +1068,10 @@
"cell_type": "markdown",
"id": "e387c5a179bac8c8",
"metadata": {
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"## Step 5: Estimate the query"
Expand All @@ -1038,7 +1086,10 @@
"end_time": "2024-01-11T22:21:08.165634300Z",
"start_time": "2024-01-11T22:21:07.849651100Z"
},
"collapsed": false
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"outputs": [
{
Expand Down
Loading

0 comments on commit 59f397d

Please sign in to comment.