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

[FIX] Addresses bug when tolerance=0 #175

Merged
merged 3 commits into from
Mar 9, 2021
Merged

[FIX] Addresses bug when tolerance=0 #175

merged 3 commits into from
Mar 9, 2021

Conversation

rmarkello
Copy link
Owner

Fixes an error raised when tolerance=0 where no samples were matched to the provided volumetric atlas. (This was due to changes in #169 that led to using MNI coordinates even for volumetric atlases, such that NO samples are exactly within the volumetric grid. We take the floor of the MNI coordinates now to avoid this error.)

Also, abagen.get_expression_data() now issues a warning (and avoids errors) if any donors have no samples matched to an atlas.

When using group-level volumetric atlases, tolerance=0 would raise
an error because no samples were assigned (because MNI coords of
samples are irregular). This takes floor of the coordinates to match
atlas grid.
Issue a warning and continue on, avoiding any errors
@rmarkello rmarkello changed the title [FIX] Bug when tolerance=0 [FIX] Addresses bug when tolerance=0 Mar 9, 2021
@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #175 (62adb99) into main (9460140) will decrease coverage by 0.17%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
- Coverage   96.37%   96.19%   -0.18%     
==========================================
  Files          37       37              
  Lines        2676     2682       +6     
==========================================
+ Hits         2579     2580       +1     
- Misses         97      102       +5     
Impacted Files Coverage Δ
abagen/allen.py 89.44% <16.66%> (-2.82%) ⬇️
abagen/matching.py 97.19% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9460140...62adb99. Read the comment docs.

@rmarkello rmarkello merged commit e0f60c8 into main Mar 9, 2021
@rmarkello rmarkello deleted the fix/tolerance branch March 9, 2021 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant