Dataset Inventory¶
In the first tutorial we will show how to search for available data
using the hoa_tools.inventory module. By the end you should know
how to search and filter the built in dataset inventory.
In [1]:
Copied!
import pandas as pd
import pandas as pd
In [2]:
Copied!
import hoa_tools.inventory
import hoa_tools.inventory
In [3]:
Copied!
pd.options.display.width = None # type: ignore[assignment]
pd.options.display.width = None # type: ignore[assignment]
Loading the inventory¶
First we'll load the inventory::
In [4]:
Copied!
inventory = hoa_tools.inventory.load_inventory()
inventory
inventory = hoa_tools.inventory.load_inventory()
inventory
Out[4]:
| donor | organ | organ_context | voi | voxel_size_um | |
|---|---|---|---|---|---|
| S-20-28_kidney_VOI-02_6.51um_bm05 | S-20-28 | kidney | NaN | VOI-02 | 6.510 |
| LADAF-2020-27_liver_complete-organ_19.61um_bm18 | LADAF-2020-27 | liver | NaN | complete-organ | 19.610 |
| S-21-46_brain_complete-organ_19.57um_bm18 | S-21-46 | brain | NaN | complete-organ | 19.570 |
| FO-20-135_lung_complete-organ_25.25um_bm05 | FO-20-135 | lung | NaN | complete-organ | 25.250 |
| LADAF-2020-27_lung_left_VOI-01-upper-lobe-apical_6.5um_bm05 | LADAF-2020-27 | lung | left | VOI-01-upper-lobe-apical | 6.500 |
| ... | ... | ... | ... | ... | ... |
| LADAF-2021-64_heart_VOI-04_6.51um_bm18 | LADAF-2021-64 | heart | NaN | VOI-04 | 6.510 |
| FO-20-155_lung_col4_6.5um_bm05 | FO-20-155 | lung | NaN | col4 | 6.500 |
| LADAF-2021-17_brain_complete-organ_42.4um_bm18 | LADAF-2021-17 | brain | NaN | complete-organ | 42.400 |
| S-20-29_heart_VOI-02_6.51um_bm18 | S-20-29 | heart | NaN | VOI-02 | 6.510 |
| LADAF-2021-17_heart_ROI-7.1_2.256um_bm18 | LADAF-2021-17 | heart | NaN | ROI-7.1 | 2.256 |
378 rows × 5 columns
The inventory is a pandas.DataFrame object. Each row is a different dataset, and each column
contains the properties of the dataset. The available columns are::
In [5]:
Copied!
print(list(inventory.columns))
print(list(inventory.columns))
['donor', 'organ', 'organ_context', 'voi', 'voxel_size_um']
Searching the inventory¶
To find all the spleen datasets we can filter the dataframe::
In [6]:
Copied!
inventory[inventory["organ"] == "spleen"]
inventory[inventory["organ"] == "spleen"]
Out[6]:
| donor | organ | organ_context | voi | voxel_size_um | |
|---|---|---|---|---|---|
| LADAF-2022-16_spleen_complete-organ_15.75um_bm18 | LADAF-2022-16 | spleen | NaN | complete-organ | 15.75 |
| LADAF-2020-27_spleen_central-column_1.29um_bm05 | LADAF-2020-27 | spleen | NaN | central-column | 1.29 |
| LADAF-2020-27_spleen_complete-organ_25.08um_bm05 | LADAF-2020-27 | spleen | NaN | complete-organ | 25.08 |
| LADAF-2021-17_spleen_complete-organ_25.0um_bm05 | LADAF-2021-17 | spleen | NaN | complete-organ | 25.00 |
| LADAF-2020-27_spleen_central-column_6.05um_bm05 | LADAF-2020-27 | spleen | NaN | central-column | 6.05 |