Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combinator check shape #17

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions atlas_densities/app/combination.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ def combine_markers(annotation_path, hierarchy_path, config):
],
columns=["gene", "volume"],
)
for gene, volume in volumes[["gene", "volume"]].values:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the official recommendation is to use to_numpy():
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.values.html

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(
Expand Down