From ea7d57ab6419be371bdab91528ddfa429a4d7361 Mon Sep 17 00:00:00 2001 From: Ahmet Nihat Simsek Date: Tue, 12 Mar 2024 14:24:05 +0100 Subject: [PATCH] Update main tutorials to version 1.0a08 --- 01-BasicConcepts.ipynb | 4 +- 02-DataFeatures.ipynb | 88 ++++++++++++++++------------ 03-ProbabilisticAssignment.ipynb | 2 +- 04-DifferentialGeneExpressions.ipynb | 2 +- 05-CombinedWorkflow.ipynb | 21 +++++-- 06-CorticalPatchSampling.ipynb | 1 + 6 files changed, 71 insertions(+), 47 deletions(-) diff --git a/01-BasicConcepts.ipynb b/01-BasicConcepts.ipynb index fe84765..4f2b681 100644 --- a/01-BasicConcepts.ipynb +++ b/01-BasicConcepts.ipynb @@ -24,7 +24,7 @@ "outputs": [], "source": [ "import siibra\n", - "assert siibra.__version__ >= \"1.0a02\"\n", + "assert siibra.__version__ >= \"1.0a08\"\n", "import os\n", "import matplotlib\n", "%matplotlib notebook" @@ -522,7 +522,7 @@ "outputs": [], "source": [ "area44r = julichbrain.get_region(\"44 right\")\n", - "bbox = area44r.get_bounding_box(\"bigbrain\")\n", + "bbox = area44r.get_boundingbox(\"bigbrain\")\n", "bbox" ] }, diff --git a/02-DataFeatures.ipynb b/02-DataFeatures.ipynb index fa622a5..6d985d6 100644 --- a/02-DataFeatures.ipynb +++ b/02-DataFeatures.ipynb @@ -22,7 +22,7 @@ "outputs": [], "source": [ "import siibra\n", - "assert siibra.__version__ >= \"1.0a02\"" + "assert siibra.__version__ >= \"1.0a08\"" ] }, { @@ -30,41 +30,55 @@ "id": "7b75cdf8", "metadata": {}, "source": [ - "We can choose different types of features from this module. The feature types are organized in a hierarchy under the most abstract type `siibra.features.Feature`. All other feature types are subclasses of it. The current hierarchy is\n", - "```\n", - "Feature\n", - "├── CompoundFeature\n", - "├── Tabular\n", - "│ ├── CorticalProfile\n", - "│ │ ├── BigBrainIntensityProfile\n", - "│ │ ├── CellDensityProfile\n", - "│ │ └── ReceptorDensityProfile\n", - "│ ├── GeneExpressions\n", - "│ │ └── ProxyFeature\n", - "│ ├── LayerwiseBigBrainIntensities\n", - "│ ├── LayerwiseCellDensity\n", - "│ ├── ReceptorDensityFingerprint\n", - "│ └── RegionalTimeseriesActivity\n", - "│ └── RegionalBOLD\n", - "├── RegionalConnectivity\n", - "│ ├── FunctionalConnectivity\n", - "│ ├── AnatomoFunctionalConnectivity\n", - "│ ├── StreamlineCounts\n", - "│ ├── StreamlineLengths\n", - "│ └── TracingConnectivity\n", - "├── Image\n", - "│ ├── CellBodyStainedVolumeOfInterest\n", - "│ ├── BlockfaceVolumeOfInterest\n", - "│ ├── DTIVolumeOfInterest\n", - "│ ├── PLIVolumeOfInterest\n", - "│ ├── MRIVolumeOfInterest\n", - "│ ├── XPCTVolumeOfInterest\n", - "│ ├── LSFMVolumeOfInterest\n", - "│ └── CellbodyStainedSection\n", - "└── EbrainsDataFeature\n", - "```\n", - "\n", - "Note that this list is provided by `siibra.features.Feature.get_ascii_tree()`." + "We can choose different types of features from this module. The feature types are organized in a hierarchy under the most abstract type `siibra.features.Feature`. All other feature types are subclasses of it. The current hierarchy can be obtained by" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "id": "96143ef5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Feature\n", + "├── CompoundFeature\n", + "├── Tabular\n", + "│ ├── CorticalProfile\n", + "│ │ ├── BigBrainIntensityProfile\n", + "│ │ ├── CellDensityProfile\n", + "│ │ └── ReceptorDensityProfile\n", + "│ ├── GeneExpressions\n", + "│ │ ├── ProxyFeature\n", + "│ │ └── ProxyFeature\n", + "│ ├── LayerwiseBigBrainIntensities\n", + "│ ├── LayerwiseCellDensity\n", + "│ ├── ReceptorDensityFingerprint\n", + "│ └── RegionalTimeseriesActivity\n", + "│ └── RegionalBOLD\n", + "├── RegionalConnectivity\n", + "│ ├── FunctionalConnectivity\n", + "│ ├── AnatomoFunctionalConnectivity\n", + "│ ├── StreamlineCounts\n", + "│ ├── StreamlineLengths\n", + "│ └── TracingConnectivity\n", + "├── Image\n", + "│ ├── CellBodyStainedVolumeOfInterest\n", + "│ ├── BlockfaceVolumeOfInterest\n", + "│ ├── DTIVolumeOfInterest\n", + "│ ├── PLIVolumeOfInterest\n", + "│ ├── MRIVolumeOfInterest\n", + "│ ├── XPCTVolumeOfInterest\n", + "│ ├── LSFMVolumeOfInterest\n", + "│ └── CellbodyStainedSection\n", + "└── EbrainsDataFeature\n" + ] + } + ], + "source": [ + "siibra.features.render_ascii_tree(\"Feature\")" ] }, { @@ -220,7 +234,7 @@ "features = siibra.features.get(\n", " v1, siibra.features.molecular.GeneExpressions, gene=[\"TAC1\", \"MAOA\", \"GABARAPL2\"]\n", ")\n", - "fig = features[0].plot()\n", + "fig = features[0].plot(title=f'Gene Expressions in {v1}')\n", "features[0].data" ] }, diff --git a/03-ProbabilisticAssignment.ipynb b/03-ProbabilisticAssignment.ipynb index fe56e49..6cd88df 100644 --- a/03-ProbabilisticAssignment.ipynb +++ b/03-ProbabilisticAssignment.ipynb @@ -7,7 +7,7 @@ "outputs": [], "source": [ "import siibra\n", - "assert siibra.__version__ >= \"1.0a02\"\n", + "assert siibra.__version__ >= \"1.0a08\"\n", "from nilearn import plotting\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook" diff --git a/04-DifferentialGeneExpressions.ipynb b/04-DifferentialGeneExpressions.ipynb index c4ac102..129d534 100644 --- a/04-DifferentialGeneExpressions.ipynb +++ b/04-DifferentialGeneExpressions.ipynb @@ -29,7 +29,7 @@ "outputs": [], "source": [ "import siibra, siibra_jugex\n", - "assert siibra.__version__ >= \"1.0a02\"\n", + "assert siibra.__version__ >= \"1.0a08\"\n", "assert siibra_jugex.__version__ >= \"1.2\"" ] }, diff --git a/05-CombinedWorkflow.ipynb b/05-CombinedWorkflow.ipynb index 2c5c058..baedd5a 100644 --- a/05-CombinedWorkflow.ipynb +++ b/05-CombinedWorkflow.ipynb @@ -19,9 +19,9 @@ "outputs": [], "source": [ "import siibra\n", - "assert siibra.__version__ >= \"1.0a02\"\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook" + "assert siibra.__version__ >= \"1.0a08\"\n", ] }, { @@ -47,6 +47,18 @@ "]" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "julich_mni_pmaps = julichbrain.get_map(\n", + " space=siibra.spaces.MNI_152_ICBM_2009C_NONLINEAR_ASYMMETRIC, \n", + " maptype=siibra.MapType.STATISTICAL\n", + ")" + ] + }, { "cell_type": "code", "execution_count": null, @@ -56,11 +68,8 @@ "# fetch and display their probability maps\n", "from nilearn import plotting\n", "for region in regions:\n", - " pmap = region.get_regional_map(\n", - " space=siibra.spaces.MNI_152_ICBM_2009C_NONLINEAR_ASYMMETRIC, \n", - " maptype=siibra.MapType.STATISTICAL\n", - " )\n", - " plotting.plot_stat_map(pmap.fetch(), title=region.name)" + " pmap = julich_mni_pmaps.fetch(region)\n", + " plotting.plot_stat_map(pmap, title=region.name)" ] }, { diff --git a/06-CorticalPatchSampling.ipynb b/06-CorticalPatchSampling.ipynb index 82b57d7..edf89d9 100644 --- a/06-CorticalPatchSampling.ipynb +++ b/06-CorticalPatchSampling.ipynb @@ -8,6 +8,7 @@ "outputs": [], "source": [ "import siibra\n", + "assert siibra.__version__ >= \"1.0a08\"\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook\n", "import numpy as np\n",