From e9b6fdc11154f683317f0afc8e680c6de538214b Mon Sep 17 00:00:00 2001 From: Mike Gevaert Date: Fri, 6 Oct 2023 13:40:11 +0200 Subject: [PATCH] doc --- CHANGELOG.rst | 5 +++-- atlas_densities/app/cell_densities.py | 4 +++- atlas_densities/app/data/metadata/README.txt | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 960d389..521af38 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,8 +3,9 @@ Changelog Version 0.2.1 ------------- -* The following `cell-density` sub-commands can now optionally take a group_ids_config: - `cell-density`, `glia-cell-densities`, `inhibitory-and-excitatory-neuron-densities`, `fit-average-densities` +* The following *cell-density* sub-commands can now optionally take a ``--group-ids-config-path``: + *cell-density*, *glia-cell-densities*, *inhibitory-and-excitatory-neuron-densities*, *fit-average-densities* + Otherwise they use the default config for the AIBS atlas. Version 0.2.0 diff --git a/atlas_densities/app/cell_densities.py b/atlas_densities/app/cell_densities.py index 55e7e95..019145e 100644 --- a/atlas_densities/app/cell_densities.py +++ b/atlas_densities/app/cell_densities.py @@ -54,6 +54,7 @@ common_atlas_options, log_args, set_verbose, + verbose_option, ) from atlas_commons.typing import FloatArray from voxcell import RegionMap, VoxelData # type: ignore @@ -154,7 +155,7 @@ def _get_voxel_volume_in_mm3(voxel_data: "VoxelData") -> float: @click.group() -@click.option("-v", "--verbose", count=True) +@verbose_option def app(verbose): """Run the cell densities CLI""" set_verbose(L, verbose) @@ -855,6 +856,7 @@ def fit_average_densities( - some regions can have NaN density values for one or more cell types because they are not covered by the selected slices of the volumetric gene marker intensities. """ + Path(fitted_densities_output_path).parent.mkdir(parents=True, exist_ok=True) L.info("Loading annotation ...") annotation = VoxelData.load_nrrd(annotation_path) diff --git a/atlas_densities/app/data/metadata/README.txt b/atlas_densities/app/data/metadata/README.txt index 6faa21c..dc8d151 100644 --- a/atlas_densities/app/data/metadata/README.txt +++ b/atlas_densities/app/data/metadata/README.txt @@ -36,3 +36,12 @@ A clause is formed of dictionary of the form: The attribute name is used for the atlas lookup, things like "name" or "acronym" are valid. Finally, one can refer to a previous stanza by preceding it with a `!`. + +The current `group_ids.json was discussed here: + https://github.com/BlueBrain/atlas-densities/pull/51#issuecomment-1748445813 + In very short, in older versions of the annotations, fibers and main regions were in separated files (ccfv2 / ccfbbp). + In the main regions, the space allocated to the fibers were annotated to Basic cell groups and regions. + For some weird reasons, the fibers do not take the entire space allocated for them. + Which means that for most of the voxels annotated to Basic cell groups and regions, they correspond to fibers. + I say most of the voxels because there are also voxels at the frontier between two main regions (e.g. Cerebellum) that were not annotated to their closest leaf region. + These voxels are gone in ccfv3.