Diff of /README.md [000000] .. [5d1cdb]

Switch to side-by-side view

--- a
+++ b/README.md
@@ -0,0 +1,162 @@
+<h1>Time-averaged simulations results for bi-phasic blood flow simulations in realistic microvascular networks for various single- and multi-capillary occlusion scenarios.</h1>
+<h2>Creators</h2>
+Schmid, Franca 
+Conti, Giulia 
+Jenny, Patrick 
+Weber, Bruno
+---
+<section id="description" class="rel-mt-2 rich-input-content" aria-label="Record description">
+    <h2 id="description-heading" class="sr-only">Description</h2>
+    
+    <div style="word-wrap: break-word;">
+      <p><strong>DOCUMENTATION&nbsp;-&nbsp;Time-averaged simulations results for bi-phasic blood flow simulations in realistic microvascular networks for various single- and multi-capillary occlusion scenarios.</strong></p>
+
+<p>Correspondence: fschmid@ethz.ch (Franca Schmid, ORCID:&nbsp;<a href="https://orcid.org/0000-0002-0689-9366">0000-0002-0689-9366</a>)</p>
+
+<p><strong>1. Related references:</strong><br>
+The data set is published in context with the manuscript:&nbsp;<br>
+[1]<em>&nbsp;The severity of microstrokes depends on local vascular topology and baseline perfusion</em>.&nbsp;<br>
+F Schmid, G Conti, P Jenny and B Weber. eLife. 2021. Doi: 10.7554/eLife.60208</p>
+
+<p>The bi-phasic blood flow simulations have been performed in realistic microvascular networks (MVNs) from the mouse somatosensory cortex first published in:<br>
+[2]<em>&nbsp;The cortical angiome: an interconnected vascular network with noncolumnar patterns of blood flow</em>. P Blinder, PS Tsai, JP Kaufhold, PM Knutsen, H Suhl and D Kleinfeld. Nature Neuroscience. 2013. Doi: 10.1038/nn.3426</p>
+
+<p>The bi-phasic blood flow model for realistic MVNs has first been published in:<br>
+[3]<em>&nbsp;Depth-dependent flow and pressure characteristics in cortical microvascular networks</em>. F Schmid, PS Tsai, D Kleinfeld, P Jenny and B Weber. PLoS Computational Biology. 2017. Doi: 10.1371/journal.pcbi.1005392</p>
+
+<p><em>For further information on how to perform bi-phasic blood flow simulation, please contact the corresponding authors of [1] or [3].</em></p>
+
+<p><strong>2. Requirements (software):</strong><br>
+<em>All simulations and analyses have been performed in Python 2.7. To execute the analysis script the following python libraries need to be installed: cPickle, python-igraph, pandas, seaborn, scipy. The individual analyses script can then be executed by in Python (e.g. “python plot_Figure3.py”).</em></p>
+
+<p><strong>3. Content:</strong><br>
+<em>All folders are stored as compressed archives (*.tar.bz2). On unix-based system the folders can be unpacked by: "</em>tar –jxf&nbsp;&nbsp;ARCHIVE_NAME"<br>
+<br>
+<strong>3a.&nbsp;Time-averaged simulation results (python dictionaries stored as python 2.7 pickle files):</strong><br>
+<strong>SimulationResults_Baseline.tar.bz2:</strong><br>
+Folders: MVN1, MVN2<br>
+Content: verticesDict_baseline.pkl, edgesDict_baseline.pkl, pathsDict_allPaths_from_DA_to_AV_mainBranch.pkl (<em>generated from&nbsp;prepare_Figure4.py</em>), data_spatial_distribution_AVfactor.pkl (<em>generated from plot_Figure4.py</em>)</p>
+
+<p><strong>SimulationResults_SingleCapillaryOcclusions.tar.bz2:</strong><br>
+Folders: 1-in-1-out, 1-in-2-out, 2-in-1-out, 2-in-2-out, 2-in-2-out_high,&nbsp;2-in-2-out_AL1, 2-in-2-out_AL2, 2-in-2-out_AL3, 2-in-2-out_AL4,&nbsp;2-in-2-out_AL5,&nbsp;2-in-2-out_closeToDA, 2-in-2-out_farFromDA<br>
+Content: verticesDict_baseline.pkl, edgesDict_baseline.pkl, pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl (<em>only folders:</em> 1-in-1-out, 1-in-2-out, 2-in-1-out, 2-in-2-out)</p>
+
+<p><strong>SimulationResults_MultiCapillaryOcclusions.tar.bz2:</strong><br>
+Folders: vesselsOccluded_1, vesselsOccluded_3, vesselsOccluded_5, vesselsOccluded_7, vesselsOccluded_9<br>
+Content: verticesDict_baseline.pkl, edgesDict_baseline.pkl, pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl</p>
+
+<p><strong>3b.&nbsp;Analysis scripts (python 2.7 scripts in folder Analyses_Scripts):</strong><br>
+<em>For details on the figure content see [1]. The verticesDict* and the edgesDict* are converted into graph structure (python-igraph) for all analyses. The functionality of python-igraph is used heavily throughout the various analyses.</em></p>
+
+<p><strong>helperFunctions.py</strong>: various functions used by the other analysis scripts</p>
+
+<p><strong>plot_Figure1_and_Figure1-supplement_1_a-d.py:</strong><br>
+<strong>Input:</strong>&nbsp;SimulationResults_Baseline/MVN1/edgesDict_baseline.pkl, SimulationResults_Baseline/MVN1/verticesDict_baseline.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-2-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-2-out/verticesDict.pkl,&nbsp;SimulationResults_SingleCapillaryOcclusion/2-in-1-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-1-out/verticesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-2-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-2-out/verticesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-1-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-1-out/verticesDict.pkl<br>
+<strong>Output:</strong>&nbsp;Figures/Figure_1/*, Supplementary_Figures/Figure_1-supplement_1_a-d/*</p>
+
+<p><strong>plot_Figure2_and_Figure2_supplement_1_a-d.py:<br>
+Input:</strong>&nbsp;SimulationResults_Baseline/MVN1/edgesDict_baseline.pkl, SimulationResults_Baseline/MVN1/verticesDict_baseline.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-2-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-2-out/verticesDict.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-1-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-1-out/verticesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-2-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-2-out/verticesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-1-out/edgesDict.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-1-out/verticesDict.pkl<br>
+<strong>Output:</strong> Figures/Figure_2/*, Supplementary_Figures/Figure_2-supplement_1_a-d/*</p>
+
+<p><strong>plot_Figure3.py:<br>
+Input:</strong>&nbsp;SimulationResults_Baseline/MVN1/edgesDict_baseline.pkl, SimulationResults_Baseline/MVN1/verticesDict_baseline.pkl, SimulationResults_MultiCapillaryOcclusion/*/edgesDict.pkl, SimulationResults_MultiCapillaryOcclusion/*/verticesDict.pkl&nbsp;<br>
+<strong>Output</strong>:&nbsp;Figures/Figure_3/*</p>
+
+<p><strong>prepare_Figure4.py&nbsp;</strong>(<em>long execution time!):</em><br>
+<strong>Input:</strong>&nbsp;SimulationResults_Baseline/MVN*/edgesDict_baseline.pkl, SimulationResults_Baseline/MVN*/verticesDict_baseline.pkl,<br>
+<strong>Output:</strong>&nbsp;SimulationResults_Baseline/MVN*/pathsDict_allPaths_from_DA_to_AV_mainBranch.pkl</p>
+
+<p><strong>plot_Figure4.py&nbsp;</strong>(<em>long execution time!):</em><br>
+<strong>Input:</strong>&nbsp;SimulationResults_Baseline/MVN*/*<br>
+<strong>Output:</strong>&nbsp;SimulationResults_Baseline/MVN*/edgesDict_baseline.pkl (attribute Lfactor_median added), SimulationResults_Baseline/MVN*/data_spatial_distribution_AVfactor.pkl, Figures/Figure_4/*</p>
+
+<p><strong>plot_Figure5.py:</strong><br>
+<strong>Input:</strong>&nbsp;SimulationResults_Baseline/MVN*/*&nbsp;<br>
+<strong>Output:</strong>&nbsp;Figures/Figure_5/*</p>
+
+<p><strong>plot_Figure6.py:</strong><br>
+Input:&nbsp;SimulationResults_Baseline/MVN1/*, SimulationResults_SingleCapillaryOcclusion/2-in-2- out/pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl, SimulationResults_SingleCapillaryOcclusion/2-in-1- out/pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-2- out/pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl, SimulationResults_SingleCapillaryOcclusion/1-in-1- out/pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased.pkl&nbsp;Output:&nbsp;Figures/Figure_6/*</p>
+
+<p><strong>4. Attributes stored in python dictionaries:</strong><br>
+<br>
+<strong>4a.&nbsp;Baseline:</strong><br>
+<strong>verticesDict:&nbsp;</strong><em>contains all relevant information and data stored at vertices.</em></p>
+
+<ul>
+	<li>index: index of vertex</li>
+	<li>pressure: time averaged pressure at vertex [mmHg]</li>
+	<li>inflowE: list of edges delivering blood to the vertex (inflows of the vertex)</li>
+	<li>outflowE: list of edges removing blood from the vertex (outflows of the vertex)</li>
+	<li>coords: coordinates of the vertex [µm]</li>
+	<li>pBC: pressure boundary conditions [mmHg], None for internal vertices</li>
+	<li>corticalDepth: depth from cortical surface [µm]</li>
+	<li>nkind: identifier for the vessel type. 0: pial artery, 1: pial vein, 2: descending arteriole, 3: ascending vein, 4: capillary</li>
+</ul>
+
+<p><strong>edgesDict:</strong>&nbsp;<em>contains all relevant information and data stored at edges.</em></p>
+
+<ul>
+	<li>diameter: effective vessel diameter [µm]. See [3] for details.</li>
+	<li>htd: time averaged discharge hematocrit [-].&nbsp;</li>
+	<li>connectivity: tuple of vertex indices which are connected by the edge.</li>
+	<li>mainAV: identifier for ascending venule (AV) main brain. 1: is AV main brain, 0: no AV main branch</li>
+	<li>mainDA: identifier for descending arteriole (DA) main brain. 1: is DA main brain, 0: no DA main branch</li>
+	<li>flow: time averaged flow rate [µm<sup>3</sup>&nbsp;ms<sup>-1</sup>]</li>
+	<li>length: tortuous vessel length [µm] See [1] and [3] for details.</li>
+	<li>tissueVolume: topological tissue volume supplied by vessel [µm<sup>3</sup>]. See [1] for details.</li>
+	<li>nkind: identifier for the vessel type. 0: pial artery, 1: pial vein, 2: descending arteriole, 3: ascending vein, 4: capillary</li>
+	<li>edgesFulfillingSelection: identifier if vessels fulfils selection criteria to qualify for analysis. 1: vessel included for analysis, 0: vessel not included for analysis. Details on the selection criteria are provided in [1].</li>
+	<li>htt: time averaged tube hematocrit [-]</li>
+	<li>RBCflux: time averaged RBC flux [RBC/s] computed from the discharge hematocrit and the flow rate.</li>
+	<li>sign: sign describing the flow direction in the vessel. +: flow direction from source (vertex with lower index) to target (vertex with higher index), -: flow direction from target to source vertex. Based on time averaged pressure values.</li>
+	<li>points: list of tortuous vessel coordinates of the edge [µm]. Starting at the source vertex. Ending at the target vertex.</li>
+	<li>Lfactor_median: AV-factor of the vessel. None if no AV-factor can be assigned. See [1] for details. Attribute added by plot_Figure4.py</li>
+</ul>
+
+<p><strong>pathsDict_allPaths_from_DA_to_AV_mainBranch:&nbsp;</strong><em>contains all flow path from DA main brain to AV main branch. For details see [1]</em>.</p>
+
+<ul>
+	<li>startPoint: list of vertex indices of the end point of the DA</li>
+	<li>endPoint: list of vertex indices of the end point of the AV</li>
+	<li>allPaths: list of lists of vertex indices describing all paths between a the associated startPoint and endPoint.</li>
+</ul>
+
+<p><strong>data_spatial_distribution_AVfactor:</strong>&nbsp;<em>contains information on the spatial distribution of venule-sided capillaries (AV-factor&nbsp;&nbsp;&gt; 0.5). For details see [1].</em></p>
+
+<ul>
+	<li>edges_L_mean_50um: list of all edges for which the average AV-factor in an analysis sphere of 50 µm has been computed.</li>
+	<li>resulting_L_mean_50um: average AV-factor for an analysis sphere for 50 µm (see Figure4/AV_factor_delta_analysisSphere50_MVN*.pkl)</li>
+	<li>shortest_distance_to_closest_vessel: list of shortest distances to any vessel for all discretization points along all venule sided capillaries.</li>
+	<li>shortest_distance_to_Lfactor_lt_05: list of shortest distances to an arteriole-sided capillary (AV-factor &lt; 0.5) for all discretization points along all venule sided capillaries.</li>
+</ul>
+
+<p><strong>4b. Occlusion scenarios (both single- and multi-capillary occlusions):</strong></p>
+
+<p><strong>verticesDict:</strong></p>
+
+<ul>
+	<li>index: index of vertex</li>
+	<li>coords: coordinates of the vertex [µm]</li>
+	<li>pressure_strokeIndex_n: time averaged pressure at vertex [mmHg] for the simulation where edge n has been occluded. For details see [1].</li>
+</ul>
+
+<p><strong>edgesDict:</strong></p>
+
+<ul>
+	<li>htd_strokeIndex_n: time averaged discharge hematocrit [-] for the simulation where edge n has been occluded. For details see [1].&nbsp;</li>
+	<li>flow: time averaged flow rate [µm<sup>3</sup>&nbsp;ms<sup>-1</sup>] for the simulation where edge n has been occluded. For details see [1].</li>
+	<li>RBCflux: time averaged RBC flux [RBC/s] computed from the discharge hematocrit and the flow rate for the simulation where edge n has been occluded. For details see [1].</li>
+	<li>htt: time averaged tube hematocrit [-] for the simulation where edge n has been occluded. For details see [1].</li>
+	<li>connectivity: tuple of vertex indices which are connected by the edge.</li>
+	<li>diameter_strokeIndex_n: effective vessel diameter [µm] for the simulation where edge n has been occluded (only given for multi-capillary occlusions).</li>
+</ul>
+
+<p><strong>pathsDict_allPaths_from_DA_to_AV_mainBranch_vertexBased:</strong>&nbsp;<em>contains all flow path from DA main brain to AV main branch (unique vertex sequences). For details see helperFunctions.py --&gt;</em><em>&nbsp;function convert_pathsDict_to_unique_vertexSequence.</em></p>
+
+<ul>
+	<li>startPoint_strokeIndex_n: list of vertex indices of the end point of the DA for the simulation where edge n has been occluded.</li>
+	<li>endpoint_strokeIndex_n: list of vertex indices of the end point of the AV for the simulation where edge n has been occluded.</li>
+	<li>allPaths_strokeIndex_n: list of lists of vertex indices describing all paths between a the associated startPoint and endpoint for the simulation where edge n has been occluded.</li>
+</ul>
+    </div>
+  </section>
\ No newline at end of file