diff --git a/atlas_densities/app/combination.py b/atlas_densities/app/combination.py index a04f907..9d3ed58 100644 --- a/atlas_densities/app/combination.py +++ b/atlas_densities/app/combination.py @@ -203,6 +203,13 @@ def combine_markers(annotation_path, hierarchy_path, config): ], columns=["gene", "volume"], ) + for gene, volume in volumes[["gene", "volume"]].values: + if len(volume.shape) > 3: + raise ValueError( + f"volume of gene {gene} has shape {volume.shape} " + "has too many values per voxel Did you remeber to sum" + " the color channels in the interpolated genes?" + ) combination_data = combination_data.merge(volumes, how="inner", on="gene") glia_intensities = markers_combinator.combine(