brainglobe / brainglobe-workflows

Workflows that utilise BrainGlobe tools to perform data analysis and visualisation.
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Deal with cells falling outside of the registered atlas boundary #71

Closed adamltyson closed 5 months ago

adamltyson commented 5 months ago

Description

Deals with the rare case in which a detected cell falls outside of the area in space for which a raw data to atlas space transform exists. This likely happens due to incorrect classification of an artefact outside the brain, or poor quality registration.

Why is this PR needed? Adds a try/except to skip these cells, and also reports them to the log.

References

Closes #42

How has this PR been tested?

This has been tested locally by running brainmapper and manually adding some cell candidates with coordinates far outside the brain. There are no automated tests added because there are no tests yet for any of this type of code, and it's out of scope for this PR. I've raised https://github.com/brainglobe/brainglobe-workflows/issues/70 to track this.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

codecov[bot] commented 5 months ago

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (2da996a) 81.39% compared to head (3790ad7) 80.47%.

Files Patch % Lines
...rainglobe_workflows/brainmapper/analyse/analyse.py 7.14% 13 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #71 +/- ## ========================================== - Coverage 81.39% 80.47% -0.93% ========================================== Files 32 32 Lines 1586 1593 +7 ========================================== - Hits 1291 1282 -9 - Misses 295 311 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.