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

new atlas file added - for cat #403

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

HenryCrosswell
Copy link

@HenryCrosswell HenryCrosswell commented Sep 3, 2024

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Becuase i would like this file to be added to the list of atlases

What does this PR do?
Reformats a feline atlas to make it usable to the brainglobe toolbox

References

Please reference any existing issues/PRs that relate to this PR.

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.
I have been unit tested it along the way, I have used the function wrapup_atlas_from_data and it has worked.

Is this a breaking change?

N/A
If this PR breaks any existing functionality, please explain how and why.

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

Checklist:

  • [x ] The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

HenryCrosswell and others added 22 commits September 3, 2024 17:38
…going to try and extract annotations from vtk files provided with data
@HenryCrosswell
Copy link
Author

@alessandrofelder

  • I have gotten wrap-up to not spit up errors and files have been saved but not sure how to double check those files.
  • I don't like how I problem solved the process, I would keep old code around in case I needed it again, making my script cluttered.
  • Still a bit confused as to how pooch works and I'm pretty certain i haven't utilised it fully.
  • I'm not sure whether I'm allowed to add my own files or if it was just based of this one script so no external scripts were used to run tests, just print statements to make sure outputs were as expected. On this I've had to add a file in with the workflow, see line 323, is this okay?
  • Got very confused with using the documentation, the template file as well as other peoples premade scripts as reference. It was all quite contradictory in places.

@alessandrofelder
Copy link
Member

Thanks, @HenryCrosswell - I've had an initial look and I'd say we are getting there. Some thoughts before our chat on Thursday:

I have gotten wrap-up to not spit up errors and files have been saved but not sure how to double check those files.

Yes, we would like to have a simple check for this, but we don't yet - or it's quite manual and not documented.

I don't like how I problem solved the process, I would keep old code around in case I needed it again, making my script cluttered.

Yes, this happens, but it's good to tidy. I suggest relying on the git history if you need to look at old code!

Still a bit confused as to how pooch works and I'm pretty certain i haven't utilised it fully.

From an initial look, it seems to me that you are generating the hash again each time you download the files (is that right?). The central idea of pooch is that you get the hash once (manually) and then check that it matches the (automatically) downloaded file.

On this I've had to add a file in with the workflow, see line 323, is this okay?

The idea of these scripts is that they can run on any computer, so no, you can't expect that file to exist: could we download the original data, and modify directly, using Python?

Got very confused with using the documentation, the template file as well as other peoples premade scripts as reference. It was all quite contradictory in places.

Yes, this is tricky - sorry. This is partly because for a while in the past BrainGlobe didn't have much developer time and partly because we are currently changing things.

@HenryCrosswell
Copy link
Author

Hey @alessandrofelder found some time to add the hard-code, let me know if you have any issues :)

@alessandrofelder
Copy link
Member

alessandrofelder commented Oct 11, 2024

Thanks a lot @HenryCrosswell
I managed to run this locally and it wrote files in the right format, which is good 🎉 this is very close!

I can see a few things that need to be addressed next:

  • It looks like the values in the template image will need to be rescaled. Otherwise the conversion to uint16 in the wrapup function will garble the values. There is an example code snippet in the axolotl packaging code for this.
  • We need some code to make a mesh of the root, probably best by thresholding the annotations and meshing the mask, following the same process we use to create meshes for atlases that don't provide them.
  • It looks like the meshes are not quite in the right place? You will see this when you validate the atlas as discussed yesterday.

…ome docstrings and removed a redundant variable name
@HenryCrosswell
Copy link
Author

Hey @alessandrofelder sorry for the delay! But i got the updated code working within napari for me, if you wanna give it a go!

I fixed the downscaling issue which seemed to have fixed the mesh placement in my version, but I'm unsure if it'll fix for you.

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.

2 participants