{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Fibers length in multi animals\n", "This example uses synthetic data to showcase how `histoquant` can be used in a [pipeline](../guide-pipeline.html).\n", "\n", "Annotations measurements should be exported from QuPath, following the required [directory structure](../guide-pipeline.html#directory-structure).\n", "\n", "Alternatively, you can merge all your CSV files yourself, one per animal, adding an animal ID to each table. Those can be processed with the `histoquant.process.process_animal()` function, in a loop, collecting the results at each iteration and finally concatenating the results. Finally, those can be used with `display` module. See the API reference for the [`process` module](../api-process.html)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import cuisto" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Full path to your configuration file, edited according to your need beforehand\n", "config_file = \"../../resources/demo_config_multi.toml\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# Files\n", "wdir = \"../../resources/multi\"\n", "animals = [\"mouse0\", \"mouse1\"]" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# get configuration\n", "cfg = cuisto.Config(config_file)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Processing mouse1: 100%|██████████| 2/2 [00:00<00:00, 15.66it/s]\n" ] }, { "data": { "text/html": [ "
\n", " | Name | \n", "hemisphere | \n", "Area µm^2 | \n", "Area mm^2 | \n", "length µm | \n", "length mm | \n", "density µm^-1 | \n", "density mm^-1 | \n", "coverage index | \n", "relative count | \n", "relative density | \n", "channel | \n", "animal | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "ACVII | \n", "Contra. | \n", "9099.04 | \n", "0.009099 | \n", "468.0381 | \n", "0.468038 | \n", "0.051438 | \n", "51438.184688 | \n", "24.07503 | \n", "0.00064 | \n", "0.022168 | \n", "marker3 | \n", "mouse0 | \n", "
1 | \n", "ACVII | \n", "Contra. | \n", "9099.04 | \n", "0.009099 | \n", "4260.4844 | \n", "4.260484 | \n", "0.468234 | \n", "468234.495068 | \n", "1994.905762 | \n", "0.0019 | \n", "0.056502 | \n", "marker2 | \n", "mouse0 | \n", "
2 | \n", "ACVII | \n", "Contra. | \n", "9099.04 | \n", "0.009099 | \n", "5337.7103 | \n", "5.33771 | \n", "0.586623 | \n", "586623.45698 | \n", "3131.226069 | \n", "0.010104 | \n", "0.242734 | \n", "marker1 | \n", "mouse0 | \n", "
3 | \n", "ACVII | \n", "Ipsi. | \n", "4609.90 | \n", "0.004610 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "marker3 | \n", "mouse0 | \n", "
4 | \n", "ACVII | \n", "Ipsi. | \n", "4609.90 | \n", "0.004610 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "marker2 | \n", "mouse0 | \n", "
5 | \n", "ACVII | \n", "Ipsi. | \n", "4609.90 | \n", "0.004610 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "marker1 | \n", "mouse0 | \n", "
6 | \n", "ACVII | \n", "both | \n", "13708.94 | \n", "0.013709 | \n", "468.0381 | \n", "0.468038 | \n", "0.034141 | \n", "34141.086036 | \n", "15.979329 | \n", "0.000284 | \n", "0.011001 | \n", "marker3 | \n", "mouse0 | \n", "
7 | \n", "ACVII | \n", "both | \n", "13708.94 | \n", "0.013709 | \n", "4260.4844 | \n", "4.260484 | \n", "0.310781 | \n", "310781.460857 | \n", "1324.079566 | \n", "0.000934 | \n", "0.030688 | \n", "marker2 | \n", "mouse0 | \n", "
8 | \n", "ACVII | \n", "both | \n", "13708.94 | \n", "0.013709 | \n", "5337.7103 | \n", "5.33771 | \n", "0.38936 | \n", "389359.811918 | \n", "2078.289878 | \n", "0.00534 | \n", "0.142623 | \n", "marker1 | \n", "mouse0 | \n", "
9 | \n", "AMB | \n", "Contra. | \n", "122463.80 | \n", "0.122464 | \n", "30482.7815 | \n", "30.482782 | \n", "0.248913 | \n", "248912.588863 | \n", "7587.548059 | \n", "0.041712 | \n", "0.107271 | \n", "marker3 | \n", "mouse0 | \n", "