{"id":20956524,"url":"https://github.com/bluebrain/bbp-atlas-pipeline","last_synced_at":"2025-05-14T05:31:59.779Z","repository":{"id":257411962,"uuid":"854583874","full_name":"BlueBrain/bbp-atlas-pipeline","owner":"BlueBrain","description":"Set of processing modules that generate annotation volumes, brain region hierarchies, direction vectors, orientations and placement hints, cell density volumes for several cell types, CellComposition of the brain regions.","archived":true,"fork":false,"pushed_at":"2024-12-10T16:04:10.000Z","size":15010,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-05-01T23:47:59.063Z","etag":null,"topics":["atlas","database"],"latest_commit_sha":null,"homepage":"https://bbp-atlas-pipeline.readthedocs.io","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueBrain.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T12:40:51.000Z","updated_at":"2025-02-26T13:17:38.000Z","dependencies_parsed_at":"2024-09-16T15:49:15.268Z","dependency_job_id":"4285008f-3991-4c1a-9374-59599bbfb4b1","html_url":"https://github.com/BlueBrain/bbp-atlas-pipeline","commit_stats":null,"previous_names":["bluebrain/bbp-atlas-pipeline"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fbbp-atlas-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fbbp-atlas-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fbbp-atlas-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueBrain%2Fbbp-atlas-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueBrain","download_url":"https://codeload.github.com/BlueBrain/bbp-atlas-pipeline/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076977,"owners_count":22010630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlas","database"],"created_at":"2024-11-19T01:26:29.659Z","updated_at":"2025-05-14T05:31:54.759Z","avatar_url":"https://github.com/BlueBrain.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blue Brain Atlas Pipeline\n\n## Table of Contents\n- [**Introduction**](#introduction)\n- [**Installation**](#installation)\n  - [Git repository](#git-repository)\n  - [Docker image](#docker-image)\n- [**Run the pipeline**](#run-the-pipeline)\n  - [Running the reference Atlas pipeline](#running-the-reference-atlas-pipeline)\n  - [Customize a pipeline rule](#customize-a-pipeline-rule)\n  - [Useful Snakemake options](#useful-snakemake-options)\n- [**Blue Brain Atlas Pipeline**](#blue-brain-atlas-pipeline-1)\n  - [Rules and modules](#rules-and-modules)\n  - [Configuration](#configuration)\n  - [Additional information](#additional-information)\n- [**Appendix**](#appendix)\n  - [Placement hints data catalog json format](#placement-hints-data-catalog-json-format)\n- [**Acknowledgment**](#funding--acknowledgment)\n\n\n## Introduction\n\nThe Blue Brain Atlas Pipeline (BBAP) is a set of processing modules that generate new data such as:\n\n- Annotation volume, brain region hierarchy, direction vectors, orientations and placement hints for selected brain regions,\n- Cell density volumes for several cell types,\n- CellComposition summary of the brain regions.\n\nTo view the command for creating the Atlas as it is pushed to Nexus and consumed by OBP \n(the \"reference\" Atlas), see the below section [Running the Reference Atlas Pipeline](#running-the-reference-atlas-pipeline).\n\n\n## Installation\n\nThe Blue Brain Atlas Pipeline (BBAP) can be installed in three different ways:\n- via this [Git repository](#git-repository),\n- via a [Docker image](#docker-image).\n\nOnce the installation step is completed, go to [Run the pipeline](#run-the-pipeline) for the instructions to run the pipeline.\n\n### Git repository\nThe BBAP can be installed directly from the `setup.py` file available in this repository:\n\n1. `git clone https://github.com/BlueBrain/bbp-atlas-pipeline.git`\n2. `pip install blue_brain_atlas_pipeline/`\n3. `cd blue_brain_atlas_pipeline`\n\n#### Dependencies\nEach package run as part of the pipeline is considered a pipeline dependency:\n\n- [token-fetch](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_nexus_token_fetch)\n- [nexusforge](https://github.com/BlueBrain/nexus-forge)\n- [bba-datafetch](https://bbpteam.epfl.ch/project/spaces/display/BBKG/bba-data-fetch)\n- [atlas-direction-vectors](https://github.com/BlueBrain/atlas-direction-vectors)\n- [atlas-splitter](https://github.com/BlueBrain/atlas-splitter)\n- [atlas-placement-hints](https://github.com/BlueBrain/atlas-placement-hints)\n- [atlas-densities](https://github.com/BlueBrain/atlas-densities)\n- [parcellationexport](https://bbpteam.epfl.ch/project/spaces/display/BBKG/parcellationexport)\n- [bba-data-integrity-check](https://bbpteam.epfl.ch/project/spaces/display/BBKG/bba-data-check)\n- [bba-data-push](https://bbpteam.epfl.ch/project/spaces/display/BBKG/bba-data-push)\n\nNow you can go to [Run the pipeline](#run-the-pipeline) for the instructions to run the pipeline.\n\n\n### Docker image\nA [Docker](https://docs.docker.com/reference) image containing all the pipeline dependencies\ncan be generated from the [`Dockerfile`](https://github.com/BlueBrain/bbp-atlas-pipeline/blob/develop/Dockerfile) provided in this repository.\n\nA benchmark of the resources to provision as required by the different pipeline steps \nis available [here](#profiling).\n\nNow you can go to [Run the pipeline](#run-the-pipeline) for the instructions to run the pipeline.\n\n\n## Run the pipeline\n\nOnce the pipeline environment is [installed](#installation), from the root directory execute  \n`export PYTHONPATH=.:$PYTHONPATH`  \nand the general command to run the pipeline is available:\n```\nbbp-atlas  --target-rule \u003ctarget_rule\u003e  --snakemake-options '\u003coptions\u003e'\n```\nwhere\n- `\u003ctarget_rule\u003e` represents the target action to execute.\n- `\u003coptions\u003e` represents the snakemake options.  \nA set of most common options is available [here](#useful-snakemake-options). \nThe option  `--cores \u003cnumber_of_cores\u003e` is mandatory unless the `--dryrun` option is used,\nand must be provided as last option.\n\n_Note_: If running multicore on a BB5 node, the step \n`transplant_mtypes_densities_from_probability_map` may exceed the available memory and \ncause a node failure. Therefore, it is recommended to use a maximum of 70 cores.\n\nA benchmark of the resources required by the different pipeline steps is available [here](#profiling).\n\n\n### Running the reference Atlas pipeline\n\nThe command that is used to run the version of the Blue Brain Atlas Pipeline that is \npushed to Nexus and then used for OBP is as follows:\n```\nbbp-atlas  --target-rule push_atlas_datasets  --user-config-path customize_pipeline/user_config.json  --snakemake-options '--config NEXUS_REGISTRATION=True  --cores all'\n```\n\nNote that unless you have special permissions, the `push_...` rules are expected to fail\nbecause only some users have write access to Nexus.\n\nThe main entities generated by the pipeline are stored under the paths and names defined \nin the config file located at `$HOME/blue_brain_atlas_pipeline/rules_config_dir_templates/push_dataset_config_template.yaml`.  \n\n#### AtlasRelease\n\nThe following command:\n```\n  bbp-atlas  --target-rule push_atlas_release  --snakemake-options '--config NEXUS_REGISTRATION=False  --cores 1'\n```\nwill generate (locally, without registering in Nexus) the following AtlasRelease (see the prod [AtlasRelease entity](https://bbp.epfl.ch/nexus/v1/resources/bbp/atlas/_/https:%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fdata%2F4906ab85-694f-469d-962f-c0174e901885)) datasets:\n- parcellationVolume: annotation volume nrrd file generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.annotation_ccfv3_l23split_barrelsplit`\n- parcellationOntology: brain region hierarchy generated at the location defined in the config under `HierarchyJson.hierarchy_ccfv3_l23split_barrelsplit`\n- directionVector: direction vector volume generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.direction_vectors_ccfv3`\n- cellOrientationField: orientation field volume generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.cell_orientations`\n- hemisphereVolume: orientation field volume generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.hemispheres`\n- placementHintsDataCatalog: json catalog of placement hints volumes generated at the location `WORKING_DIR/ph_catalog_distribution.json`\n  This catalog has the format described in the [Appendix](#placement-hints-data-catalog-json-format) and groups the placement hints by regions and layers.\n  The set of actual placement hints nrrd files are generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.placement_hints`\n\n#### CellComposition\n\nThe following command:\n```\n  bbp-atlas  --target-rule push_cellComposition  --snakemake-options '--config NEXUS_REGISTRATION=False  --cores 1'\n```\nwill generate (locally, without registering in Nexus) the following CellComposition (see the prod [CellComposition entity](https://bbp.epfl.ch/nexus/v1/resources/bbp/atlasdatasetrelease/_/https:%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fdata%2Fcellcompositions%2F54818e46-cf8c-4bd6-9b68-34dffbc8a68c)) datasets:\n- cellCompositionVolume: json file generated at the location `WORKING_DIR/cellCompositionVolume_payload.json`,\n  containing the ids of selected ME-type density nrrd files registered in Nexus,\n  grouped by M-type and E-type.  \n  The whole set of ME-type densities is generated at the location defined in the config under `GeneratedDatasetPath.VolumetricFile.mtypes_densities_probability_map_transplant`\n- cellCompositionSummary: json file generated at the location `WORKING_DIR/cellCompositionSummary_payload.json`,\n  containing the values of the ME-type densities in the cellCompositionVolume,\n  grouped by regions\n\n***\n**NOTE for versions \u003c v1.0.0**  \nThe selected ME-type densities that enter the [CellCompositionVolume](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/cellCompVolume_payload.py?ref_type=heads#L16)\nare those having a `layer` in their Nexus Resource property `brainLocation`, plus the two   \n`Generic{Inhibitory,Excitatory}NeuronMType`-`Generic{Inhibitory,Excitatory}NeuronEType`.\n\nFor an ME-type density Resource to be registered by the pipeline with such a `layer` property,\nthe [Nexus Ontology Class of its M-type](https://bbpteam.epfl.ch/project/spaces/display/BBKG/METypes+Registration#METypesRegistration-Checkexistingcelltypes)\nmust have the `hasLayerLocationPhenotype` attribute:\n```\nres = forge.resolve(\"\u003cM-type label\u003e\", scope=\"ontology\", target=\"CellType\", strategy=\"EXACT_MATCH\")\nres_layer = res.hasLayerLocationPhenotype\n```\n***\n\n#### Miscellanea\n\nThe rules in the previous commands trigger many intermediate dependent rules as described [here](#blue-brain-atlas-pipeline-1).\n\nThe pipeline consumes a configuration file described [here](#configuration), by default \nnamed `config.yaml` and located in the directory from which the pipeline is run.  \nA specific config file can be provided via the `--configfile` option:\n```\nbbp-atlas  --target-rule \u003ctarget_rule\u003e  --snakemake-options '--configfile \u003cconfig_file_path\u003e'\n```\n\n**NOTE**  \nTo run the pipeline skipping the generation of datasets already available (in \ncase a previous run failed at an intermediate step for instance), the [option](#useful-snakemake-options) \n`--rerun-trigger mtime` can be used as in the following command:\n```\nbbp-atlas  --target-rule \u003ctarget_rule\u003e  --snakemake-options '--rerun-trigger mtime  --cores 1'\n```\nSuch an option allows to skip the execution of the pipeline steps whose output \nfiles exist and have a modification time (`mtime`) more recent than any of their\ninput files.\n***\n\n### Customize a pipeline rule\n\nIt is possible to customize a pipeline rule that generates a (set of) volumetric file \n(`.nrrd`) in order to change the values of a specific region of the volume (and leave \nthe rest of the volume unchanged).\nThe customization happens via the configuration file [`customize_pipeline/user_config.json`](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/customize_pipeline/user_config.json)\nwith the following structure:\n- `rule`: name of the rule to customize from the default pipeline;\n- `brainRegion`: ID of the brain region to customize;\n- `CLI`:\n  - `command`: CLI to execute in order to produce the volumetric file with the desired values for the brain region of interest;\n  - `args`: CLI arguments that can reference variables between curly brackets (see below);\n- `output_dir`: path of the folder where the volumetric file(s) is generated by the CLI;\n- `container`: URL of the Docker image to use in order to spawn a container where the CLI will be executed. This parameter\nis optional: if not provided, the CLI will be executed in the same environment of the default pipeline (in such a case,\nthe user must ensure that the provided CLI is defined therein).\n\n_Note_: the Snakemake option `--use-singularity` must be provided for the configuration parameter `container` to be considered.\n\nThe CLI `args` can reference one or more variables which points to files generated by \npipeline rules executed before the rule to customize. The list of variables is available\nin [customize_pipeline/available_vars.yaml](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/customize_pipeline/available_vars.yaml).\n\n#### Filename convention\nThe user must ensure that the files generated by the provided CLI have the same names as\nthe files generated by the rule to customize.  \nFor example, the rule `direction_vectors_placeholder_ccfv3`\nin the sample configuration generates one output file `direction_vectors_ccfv3.nrrd`.  \nThe `placement_hints` rule generates seven volumetric files: `[PH]y.nrrd` and \n`[PH]layer_n.nrrd` where n = 1, ..., 6. The mapping between each nrrd file and the layer\nit refers to for each region is available in [this dictionary](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/metadata/PH_layers_regions_map.json),\nwhich the user needs to extend with the `\"region acronym\": {\"layer ID\", \"layer label\"}` \nof its customized region. A layer is considered associated to a region if the \ncorresponding layer ID appears in the [regions-to-layers mapping](#brain-region-layers) for that region \nor for at least one of that region's offspring.\n\n#### Customized pipeline\nOnce the [configuration file](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/customize_pipeline/user_config.json)\nis ready, the customized pipeline can be run with the following command:\n```\nbbp-atlas  --target-rule \u003ctarget_rule\u003e  --user-config-path customize_pipeline/user_config.json  --snakemake-options '\u003coptions\u003e'\n```\n\nWhen a rule is customized as described above, the pipeline will run\n1. the default rule to generate the default output file(s),\n2. the CLI provided in the configuration file to produce the corresponding \nregion-specific output file(s),\n3. a merge step to override the specific region in the default file(s) (step 1) with the \nvalues of that region from the region-specific file(s) (step 2).\n\n#### Integration\nIn case a user wants to request the integration of the customized version of a dataset:\n1. Open a Merge Request (MR) in this repository including the updated `user_config.json`\nand any additional input [metadata](#metadata) required.\n2. The MR is then reviewed and, if approved, a new Atlas pipeline dev image is produced accordingly.\n3. The new pipeline is run and the new datasets are registered in Nexus staging for wider tests.\n4. When the new version of the datasets is validated, a new tag of the Atlas pipeline is\ncut and the corresponding image is used to register the datasets in Nexus prod.\n\n##### Metadata\nSome pipeline steps require metadata as input, which are fetched from Nexus.  \nCurrently, the files available in the [`metadata`](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/tree/develop/metadata)\ndirectory are automatically synchronized with their Nexus versions.  \nIf you want to update/add one metadata file, make sure to update/add also the \ncorresponding documentation file in the [`metadata/docs`](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/tree/develop/metadata/docs)\ndirectory, keeping the current naming convention (`probability_map_*{.csv,.txt}`).\n\n#### Direction-vectors and placement-hints\n\nIf you want to add creation of your region's direction-vectors, placement-hints, or other NRRD files that need to be merged with files containing data from other regions, you should add them using the instructions in [Customize a pipeline rule](#customize-a-pipeline-rule) into `customize_pipeline/user_config.json` instead of the `snakefile` directly.\n\n### Useful Snakemake options\n\nSnakemake being a command-line tool, it comes with a multitude of optional arguments to\nexecute, debug, and visualize workflows. Here is a selection of the most used:\n\n- `--cores \u003cnumber_of_cores\u003e`, `-c \u003cnumber_of_cores\u003e` → Specify the number of cores \nsnakemake can use.\n- `--dry-run`, `-n` → Perform a dry run (execute nothing but print the list of rules\nthat would be executed).\n- `--rerun-trigger mtime` → Use only the modification time (`mtime`) of the existing \noutput files to determine which rules to execute.\n- `--forcerun \u003csome_rule\u003e` → Force a given rule to be re-executed (overwrite the output \nif it already exists).\n- `--list`, `-l` → Print a list of all the available rules from the snakefile.\n\nEvery Snakemake command line argument is listed and described in the [Snakemake](https://snakemake.readthedocs.io/en/stable/) official documentation page.\n\n\n## Blue Brain Atlas Pipeline\n\nIts workflow consists of the following steps:\n1. Fetch the required datasets from Nexus. These input data consist of the [original AIBS ccfv3 brain parcellation](https://bbp.epfl.ch/nexus/web/bbp/atlas/resources/https%3A%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fdata%2F025eef5f-2a9a-4119-b53f-338452c72f2a), \nthe [AIBS Mouse CCF Atlas regions hierarchy file](https://bbp.epfl.ch/nexus/web/neurosciencegraph/datamodels/resources/http%3A%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fontologies%2Fmba) and a series of Nissl and ISH volumes \nas described in the documentation page [Allen Mouse CCF Compatible Data](https://bbpteam.epfl.ch/project/spaces/display/BBKG/Allen+Mouse+CCF+Compatible+Data).\n2. The fetched datasets are then fed to the [Snakemake](https://snakemake.readthedocs.io/en/stable/) rules, and under the hood consumed by atlas modules to generate products. \n3. Each product can (optionally) be pushed into Nexus with a set of metadata automatically filled up and be visualised in \nthe [Blue Brain Atlas](https://bbpteam.epfl.ch/documentation/#:~:text=Visualize-,Blue%20Brain%20Atlas,-Morphology%20visualization).\n\nThis workflow is illustrated on the following diagram containing the directed acyclic graph (DAG)\nof the Snakemake rules of the BBAP:\n\n![README_pipeline_DAG](doc/source/figures/dag_push_atlas.svg)\n\nA more detailed DAG listing the input and output files for each step is available [here](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/doc/source/figures/dag_push_atlas_fg.svg).\n\n### Rules and modules\nIn this document, a “module” is a CLI encapsulated inside one of the components of the pipeline.\nSuch component is called a “rule”. This terminology comes from SnakeMake, where a “rule” \ncan leverage one or more modules and where a module can be used by one of more rules,\nusually using a different set of arguments.  \nYou can find more information on rules in the [SnakeMake documentation](https://snakemake.readthedocs.io/en/stable/).\n\nTo only visualize the command that a given rule will execute without running it, one can\nuse the `--dryrun` option as in the following command:\n```\n  bbp-atlas  --target-rule \u003ctarget_rule\u003e  --snakemake-options '--dryrun'\n```\nThe documentation of each command is available in the corresponding pipeline [dependency](#dependencies).\n\n#### Profiling\nA detailed profiling of the most resource-intensive rules (sorted by execution order) \nis available in the following table, corresponding to a single core of an \nIntel Xeon Gold 6140 CPU (BB5 node).  \nSome rules can exploit multiple cores, in which case a second entry for such rules \nappears in the table along with the number of cores (\"--cores n\") used for the \nprofiling.\n\nThe **total multicore wall clock time** required by the two final rules `push_atlas_release` \n(which depends on direction vectors, orientation field, placement hints) and \n`push_cellComposition` (which depends on all the density generation rules) is \nrespectively **1 h** (with an RSS peak of 10 GB) and **4 h** (with an RSS peak of 8 GB).\n\n| Rule name                                                   | wall clock time [s] | wall clock time [h:m:s] | max [RSS](https://en.wikipedia.org/wiki/Resident_set_size) [MB] | max [VMS](https://en.wikipedia.org/wiki/Virtual_memory) [MB] | max [USS](https://en.wikipedia.org/wiki/Unique_set_size) [MB] | max [PSS](https://en.wikipedia.org/wiki/Proportional_set_size) [MB] | I/O in [B] | I/O out [B] | average CPU load [%] | CPU time [s] |\n|-------------------------------------------------------------|--------------------:|------------------------:|----------------------------------------------------------------:|-------------------------------------------------------------:|--------------------------------------------------------------:|--------------------------------------------------------------------:|-----------:|------------:|---------------------:|-------------:|\n| direction_vectors_default_ccfv3                             |            352.1527 |                 0:05:52 |                                                         3345.09 |                                                      4503.41 |                                                       3309.88 |                                                             3321.13 |       0.07 |        0.00 |                98.53 |       347.43 |\n| direction_vectors_isocortex_ccfv3                           |            376.2279 |                 0:06:16 |                                                         5438.86 |                                                      6049.21 |                                                       5401.71 |                                                             5412.96 |       0.00 |        0.00 |                92.23 |       347.29 |\n| orientation_field                                           |            248.3647 |                 0:04:08 |                                                         8423.66 |                                                      9010.55 |                                                       8388.29 |                                                             8399.54 |       0.00 |        0.00 |                91.73 |       228.17 |\n| split_isocortex_layer_23_ccfv3                              |            147.5079 |                 0:02:27 |                                                         1945.17 |                                                      2977.68 |                                                       1866.67 |                                                             1877.88 |       0.83 |        0.00 |                92.70 |       137.05 |\n| create_leaves_only_hierarchy_annotation_ccfv3               |             46.3272 |                 0:00:46 |                                                         5897.06 |                                                      6542.66 |                                                       5818.63 |                                                             5830.39 |       0.04 |        0.00 |                36.30 |        17.06 |\n| split_barrel_ccfv3_l23split                                 |            141.6368 |                 0:02:21 |                                                          715.49 |                                                      2420.59 |                                                        679.82 |                                                              691.35 |       0.06 |        0.00 |                96.49 |       137.23 |\n| validate_annotation_v3                                      |              4.8913 |                 0:00:04 |                                                          908.17 |                                                      1749.66 |                                                        865.54 |                                                              876.86 |       0.03 |        0.00 |                71.09 |         3.81 |\n| placement_hints                                             |            924.7421 |                 0:15:24 |                                                         6600.64 |                                                      7225.64 |                                                       6524.41 |                                                             6537.06 |       7.41 |        0.00 |                99.36 |       919.29 |\n| create_hemispheres_ccfv3                                    |              6.3128 |                 0:00:06 |                                                          547.75 |                                                      1233.48 |                                                        514.01 |                                                              524.86 |       0.00 |        0.00 |                68.63 |         4.67 |\n| export_brain_region                                         |          27482.2978 |                 7:38:02 |                                                         2649.79 |                                                      3214.40 |                                                       3497.71 |                                                             3509.16 |       0.40 |        0.00 |                99.68 |     27395.00 |\n| export_brain_region (`--cores 70`)                          |           1162.2325 |                 0:19:22 |                                                       143397.54 |                                                    193202.21 |                                                     115383.76 |                                                          \t115749.06 |       0.04 |       \t0.00 |             \t4307.04 |     50067.62 |\n| combine_v2_annotations                                      |             17.5364 |                 0:00:17 |                                                         1030.33 |                                                      1581.99 |                                                       1002.29 |                                                             1015.24 |       1.09 |        0.00 |                85.00 |        15.44 |\n| direction_vectors_isocortex_ccfv2                           |            299.9846 |                 0:04:59 |                                                         5483.91 |                                                      6050.02 |                                                       5454.11 |                                                             5467.01 |       0.04 |        0.00 |                95.15 |       285.99 |\n| split_isocortex_layer_23_ccfv2                              |            153.1193 |                 0:02:33 |                                                         1999.78 |                                                      2979.68 |                                                       1937.86 |                                                             1950.75 |       0.00 |        0.00 |                88.49 |       135.96 |\n| create_leaves_only_hierarchy_annotation_ccfv2               |             31.2190 |                 0:00:31 |                                                         6027.33 |                                                      6836.57 |                                                       6276.27 |                                                             6289.61 |       0.04 |        0.00 |                51.64 |        16.60 |\n| split_barrel_ccfv2_l23split                                 |            112.8031 |                 0:01:52 |                                                          737.26 |                                                      2421.75 |                                                        706.36 |                                                              719.25 |       0.06 |        0.00 |                93.59 |       106.04 |\n| validate_annotation_v2                                      |              2.3923 |                 0:00:02 |                                                         1116.59 |                                                      1736.83 |                                                       1076.46 |                                                             1089.53 |       0.03 |        0.00 |                66.48 |         2.12 |\n| cell_density_correctednissl                                 |             55.1323 |                 0:00:55 |                                                         2867.18 |                                                      3418.92 |                                                       2839.32 |                                                             2852.28 |       0.00 |        0.00 |                82.24 |        45.88 |\n| validate_cell_density                                       |              4.8925 |                 0:00:04 |                                                         1252.33 |                                                      2355.65 |                                                       1767.52 |                                                             1780.59 |       0.00 |        0.00 |                76.66 |         4.27 |\n| combine_markers                                             |            555.3407 |                 0:09:15 |                                                         5147.12 |                                                      5697.71 |                                                       5119.06 |                                                             5132.01 |       0.00 |        0.00 |                94.58 |       525.61 |\n| glia_cell_densities_correctednissl                          |            221.8078 |                 0:03:41 |                                                         7373.72 |                                                      8061.20 |                                                       7298.36 |                                                             7311.31 |       0.00 |        0.00 |                87.87 |       195.19 |\n| validate_neuron_glia_cell_densities                         |             17.4026 |                 0:00:17 |                                                         3845.63 |                                                      4698.86 |                                                       4109.74 |                                                             4122.81 |       0.00 |        0.00 |                89.61 |        16.00 |\n| average_densities_correctednissl                            |           2886.3829 |                 0:48:06 |                                                         3889.09 |                                                      5342.21 |                                                       3841.21 |                                                             3854.18 |       0.00 |        0.00 |                99.22 |      2864.22 |\n| fit_average_densities_correctednissl                        |           2185.0088 |                 0:36:25 |                                                         5605.01 |                                                      7106.13 |                                                       5410.92 |                                                             5423.89 |       0.00 |        0.00 |                99.52 |      2174.67 |\n| inhibitory_neuron_densities_linprog_correctednissl          |           2859.1158 |                 0:47:39 |                                                         4799.59 |                                                     18207.76 |                                                       4771.89 |                                                             4784.86 |       0.00 |        0.00 |                99.16 |      2834.94 |\n| compute_lamp5_density                                       |             53.7274 |                 0:00:53 |                                                         3652.39 |                                                      4176.77 |                                                       4964.55 |                                                             4977.10 |       0.00 |        0.00 |                83.84 |        45.36 |\n| create_mtypes_densities_from_probability_map                |          31310.7357 |                 8:41:50 |                                                        31178.52 |                                                     32289.28 |                                                      31150.59 |                                                            31163.56 |       0.00 |        0.00 |                99.69 |     31209.90 |\n| create_mtypes_densities_from_probability_map (`--cores 70`) |           6276.3961 |                 1:44:36 |                                                       394077.36 |                                                   2285360.80 |                                                      63690.27 |                                                            82778.46 |       1.04 |       \t0.00 |             \t5992.08 |    376431.41 |\n| excitatory_split                                            |            222.6994 |                 0:03:42 |                                                         3437.98 |                                                      3989.99 |                                                       3410.12 |                                                             3423.07 |       0.00 |        0.00 |                87.40 |       195.18 |\n| create_cellCompositionVolume_payload                        |            414.9835 |                 0:06:54 |                                                               0 |                                                            0 |                                                             0 |                                                                   0 |       0.00 |        0.00 |                 0.25 |            0 |\n| create_cellCompositionSummary_payload                       |           1205.1099 |                 0:20:05 |                                                         2414.04 |                                                     \t5000.99 |                                                      \t2230.68 |                                                             2308.75 |       3.73 |       \t0.00 |                84.15 |      1030.68 |\n| create_cellCompositionSummary_payload (`--cores 70`)        |            206.0507 |                 0:03:26 |                                                       \t21817.64 |                                                     67112.53 |                                                      12911.70 |                                                            13023.87 |       0.00 |       \t0.00 |               635.94 |      1314.64 |\n\n\n#### Fetch rules\nThe rules starting with \"fetch_\" are used to download a given file from Nexus.  \nThe IDs of the corresponding Nexus Resource (containing a description of the file to \nfetch) are listed in the [nexus_ids.json](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/nexus_ids.json) (the explicit link between a fetch \nrule and the corresponding Resource ID lays in the `nexus_id` parameter of the rule \ndefinition in the [snakefile](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/snakefile)).  \n_Note_: the rule \"fetch_genes_correctednissl\" is not linked to a specific Resource, it's \nused just to trigger the execution of a set of single \"fetch_gene_\" rules needed by the\n\"fit-average-densities\" step.\n\nIn order to run the pipeline with a different version of a fetched file, one can just\nexecute the corresponding fetch rule and subsequently replace the downloaded file with \nthe desired version, by keeping the same name of the originally fetched file.  \nThe `--rerun-trigger mtime` [option](#useful-snakemake-options) may be useful here.\n\n### Configuration\n\nThe configuration of the pipeline is provided in the `config.yaml` file. The most important\nvariables that a user can customize are:\n\n- `WORKING_DIR`: the output directory of the pipeline files,\n- `NEXUS_IDS_FILE`: the json file containing the Ids of the Nexus Resources to fetch,\n- `FORGE_CONFIG`: the configuration file (yaml) to instantiate nexus-forge,\n- `NEW_ATLAS`: boolean flag to trigger the creation of a brand-new atlas release,\n- `RESOLUTION`: resolution (in μm) of the input volumetric files to be consumed by the pipeline (default to 25),\n- `NEXUS_REGISTRATION`: boolean flag to trigger data registration in Nexus\n- `RESOURCE_TAG`: string to use as tag of the data registered in Nexus\n- `IS_PROD_ENV`: boolean flag to indicate whether the target Nexus environment is production or not (staging),\n- `NEXUS_DESTINATION_ORG`/`NEXUS_DESTINATION_PROJ`: Nexus organization/project where register the pipeline products,\n- `DISPLAY_HELP`: boolean flag to display every rule of the snakefile with its descriptions.\n\nIt is possible to override the config variables at runtime using the snakemake argument `--config`:  \n`--config \u003cVAR_NAME\u003e=\u003cVALUE\u003e`\n\n### Additional information\nThe release notes are available [here](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/doc/release_notes.md).\n\nMore information about The Blue Brain Atlas Pipeline (BBAP) are available in its [confluence documentation](https://bbpteam.epfl.ch/project/spaces/display/BBKG/Atlas+Pipeline).  \nThis space contains several documentation pages describing:  \nThe Allen Mouse CCF Compatible Data : [https://bbpteam.epfl.ch/project/spaces/display/BBKG/Allen+Mouse+CCF+Compatible+Data](https://bbpteam.epfl.ch/project/spaces/display/BBKG/Allen+Mouse+CCF+Compatible+Data)   \nThe Atlas Modules : [https://bbpteam.epfl.ch/project/spaces/display/BBKG/Atlas+Modules](https://bbpteam.epfl.ch/project/spaces/display/BBKG/Atlas+Modules)\n\n\n## Appendix\n\n### Brain region layers\nSome brain areas have a subdivision in layers.  \nThe mapping adopted in the BBP between a brain region and the layers it belongs to is \nprovided in [this dictionary](https://bbpgitlab.epfl.ch/dke/apps/blue_brain_atlas_pipeline/-/blob/develop/metadata/regions_layers_map.json),\nwhere the keys are brain region IDs and the layers are identified with \n[Uberon](https://www.ebi.ac.uk/ols4/ontologies/uberon) classes.  \nOne layer - \"Neocortex layer 6a\" - is not present in the Uberon ontology and is defined \nas follows:\n```\n\u003chttps://bbp.epfl.ch/ontologies/core/bmo/neocortex_layer_6a\u003e rdf:type owl:Class ;\n    rdfs:subClassOf \u003chttp://purl.obolibrary.org/obo/UBERON_0002301\u003e ;\n    rdfs:label \"L6a\"^^xsd:string ;\n    \u003chttp://www.w3.org/2004/02/skos/core#definition\u003e \"Neocortex layer 6a.\"^^xsd:string ;\n    \u003chttp://www.w3.org/2004/02/skos/core#altLabel\u003e \"layer 6a\"^^xsd:string ;\n    \u003chttp://www.w3.org/2004/02/skos/core#altLabel\u003e \"neocortex layer 6a\"^^xsd:string  ;\n    \u003chttp://www.w3.org/2004/02/skos/core#prefLabel\u003e \"L6a\"^^xsd:string ;\n    \u003chttp://www.w3.org/2004/02/skos/core#notation\u003e \"L6a\"^^xsd:string .\n```\n\n\n### Placement hints data catalog json format\n```json\n{\n  \"placementHints\": [\n    {\n      \"@id\": \"https://bbp.epfl.ch/data/bbp/atlas/f1049c1b-f1af-4d33-acd9-099f05c56bbf\",\n      \"_rev\": 13,\n      \"distribution\": {\n        \"atLocation\": {\n          \"location\": \"file:///gpfs/bbp.cscs.ch/data/project/proj39/nexus/bbp/atlas/9/b/1/3/3/7/7/9/%5BPH%5Dlayer_1.nrrd\"\n        },\n        \"name\": \"[PH]layer_1.nrrd\"\n      },\n      \"regions\": {\n        \"Isocortex\": {\n          \"@id\": \"http://api.brain-map.org/api/v2/data/Structure/315\",\n          \"hasLeafRegionPart\": [\n            \"PL1\",\n            \"...\"\n          ],\n          \"layer\": {\n            \"@id\": \"http://purl.obolibrary.org/obo/UBERON_0005390\",\n            \"label\": \"L1\"\n          }\n        },\n        \"Hippocampal formation\": {\n          \"@id\": \"http://api.brain-map.org/api/v2/data/Structure/1089\",\n          \"hasLeafRegionPart\": [\n            \"CA1sp\",\n            \"...\"\n          ],\n          \"layer\": {\n            \"@id\": \"http://purl.obolibrary.org/obo/UBERON_0002313\",\n            \"label\": \"SP\"\n          }\n        },\n        \"...\": {}\n      }\n    },\n    {\n      \"@id\": \"https://bbp.epfl.ch/data/bbp/atlas/74ba22b1-39ee-486d-ab3c-cb960d006a5d\",\n      \"_rev\": 13,\n      \"distribution\": {\n        \"atLocation\": {\n          \"location\": \"file:///gpfs/bbp.cscs.ch/data/project/proj39/nexus/bbp/atlas/a/9/3/0/d/e/a/8/%5BPH%5Dlayer_2.nrrd\"\n        },\n        \"name\": \"[PH]layer_2.nrrd\"\n      },\n      \"regions\": {\n        \"Isocortex\": {\n          \"@id\": \"http://api.brain-map.org/api/v2/data/Structure/315\",\n          \"hasLeafRegionPart\": [\n            \"AUDp2\",\n            \"...\"\n          ],\n          \"layer\": {\n            \"@id\": \"http://purl.obolibrary.org/obo/UBERON_0005391\",\n            \"label\": \"L2\"\n          }\n        },\n        \"Hippocampal formation\": {\n          \"@id\": \"http://api.brain-map.org/api/v2/data/Structure/1089\",\n          \"hasLeafRegionPart\": [\n            \"CA1so\",\n            \"...\"\n          ],\n          \"layer\": {\n            \"@id\": \"http://purl.obolibrary.org/obo/UBERON_0005371\",\n            \"label\": \"SO\"\n          }\n        },\n        \"...\": {}\n      }\n    },\n   \"...\"\n  ],\n  \"voxelDistanceToRegionBottom\": {\n    \"@id\": \"https://bbp.epfl.ch/data/bbp/atlas/59a2bca3-d8b6-43b1-870e-a0c19a020175\",\n    \"_rev\": 13,\n    \"distribution\": {\n      \"atLocation\": {\n        \"location\": \"file:///gpfs/bbp.cscs.ch/data/project/proj39/nexus/bbp/atlas/3/9/e/b/6/d/8/b/%5BPH%5Dy.nrrd\"\n      },\n      \"name\": \"[PH]y.nrrd\"\n    }\n  }\n}\n```\n\n\n## Funding \u0026 Acknowledgment\nThe development of this software was supported by funding to the Blue Brain Project, a \nresearch center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss \ngovernment’s ETH Board of the Swiss Federal Institutes of Technology.\n\nCopyright © 2020-2024 Blue Brain Project/EPFL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fbbp-atlas-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluebrain%2Fbbp-atlas-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluebrain%2Fbbp-atlas-pipeline/lists"}