Skip to content

Commit

Permalink
Update main tutorials to version 1.0a08
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmetNSimsek committed Mar 12, 2024
1 parent ea227a8 commit ea7d57a
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 47 deletions.
4 changes: 2 additions & 2 deletions 01-BasicConcepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
]
},
Expand Down
88 changes: 51 additions & 37 deletions 02-DataFeatures.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,63 @@
"outputs": [],
"source": [
"import siibra\n",
"assert siibra.__version__ >= \"1.0a02\""
"assert siibra.__version__ >= \"1.0a08\""
]
},
{
"cell_type": "markdown",
"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\")"
]
},
{
Expand Down Expand Up @@ -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"
]
},
Expand Down
2 changes: 1 addition & 1 deletion 03-ProbabilisticAssignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion 04-DifferentialGeneExpressions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
]
},
Expand Down
21 changes: 15 additions & 6 deletions 05-CombinedWorkflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
},
{
Expand All @@ -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,
Expand All @@ -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)"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions 06-CorticalPatchSampling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ea7d57a

Please sign in to comment.