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

CSV download #92

Merged
merged 22 commits into from
Jun 20, 2024
Merged

CSV download #92

merged 22 commits into from
Jun 20, 2024

Conversation

ehoops-cz
Copy link
Collaborator

@ehoops-cz ehoops-cz commented May 31, 2024

Resolves #78

  • Modifies zarr generation script to include parentTrackId in the data field
  • Reads in the data field and stores it on the track object on the canvas
  • Reads out the data when the user clicks on "Export Cell Tracks" button

TODO:

  • verify that the correct values are in there
  • write some tests I ended up testing manually - should these be automated?
  • get this data in the webapp and add it to the csv download

To test:
run the script to generate a new zarr bundle and serve it locally

Screenshot 2024-06-13 at 2 01 24 PM Screenshot 2024-06-13 at 2 01 15 PM

NOTE: We will need to update the data on S3 to include the data field. There will be downtime if this is not done first.

Copy link

vercel bot commented May 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
points-web-viewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 7:38pm

@ehoops-cz ehoops-cz changed the title CSV download [WIP] CSV download May 31, 2024
@aganders3
Copy link
Collaborator

Note: there's some bug. When the points load, they are clearly not in the same place on the canvas, but I'm not sure why.

I saw this too - it's likely a bug on main as well. I will make a new issue.

@ehoops-cz
Copy link
Collaborator Author

an example csv is on sheet 2 here: https://docs.google.com/spreadsheets/d/1akqPHvt_Yu7lZ7L6E_2bxM7D0u6lYDpiLheouJ_l3Kk/edit?gid=1909503628#gid=1909503628

I think there's something wrong with the data, but still looking into it

@aganders3
Copy link
Collaborator

Can you grant access to that sheet?

src/components/App.tsx Outdated Show resolved Hide resolved
@ehoops-cz
Copy link
Collaborator Author

ehoops-cz commented Jun 13, 2024

Can you grant access to that sheet?

done! sorry!

I think the input CSV is in t, z, y, x order. Is it possible that is the problem here?

I don't think so. The values seem to be trackIds, just not the right ones. Maybe I'm putting them in the data rows instead of columns?

@ehoops-cz
Copy link
Collaborator Author

update: I tried switching the rows/columns and that was very obviously wrong. All of the tracks were listed as having no parentTrackId.

@aganders3
Copy link
Collaborator

I'm going to try to look at this more closely today.

@ehoops-cz ehoops-cz changed the title [WIP] CSV download CSV download Jun 13, 2024
Copy link
Collaborator

@andy-sweet andy-sweet left a comment

Choose a reason for hiding this comment

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

Still need to finish looking at everything, but generally looks good. There's seems one bug maybe related to the track geometry changes that needs to be addressed before this can be merged though.

src/components/App.tsx Show resolved Hide resolved
src/lib/three/TrackGeometry.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@aganders3 aganders3 left a comment

Choose a reason for hiding this comment

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

Generally looks good and I was able to export some tracks and read them in napari, where all looked okay to me.

I have a couple questions and nitpicks, and also interested about some of @andy-sweet's comments.

src/lib/PointCanvas.ts Outdated Show resolved Hide resolved
src/lib/ViewerState.ts Outdated Show resolved Hide resolved
src/lib/three/TrackGeometry.ts Outdated Show resolved Hide resolved
src/components/App.tsx Show resolved Hide resolved
ehoops-cz and others added 2 commits June 18, 2024 14:28
Copy link
Collaborator

@andy-sweet andy-sweet left a comment

Choose a reason for hiding this comment

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

Looks good to me and the feature is a great to tie this back to the napari plugin. Some nice improvements in the CSV to Zarr converter too! I have one optional suggestion/simplification, but it's non-blocking.

Given that Ashley has more experience with the three.js data structures here, you should wait for approval from him before merging!

tools/convert_tracks_csv_to_sparse_zarr.py Show resolved Hide resolved
src/components/DownloadButton.tsx Outdated Show resolved Hide resolved
simplify csv conversion function

Co-authored-by: Andy Sweet <[email protected]>
src/lib/PointCanvas.ts Outdated Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@aganders3 aganders3 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for taking this one on.

@ehoops-cz ehoops-cz merged commit fafbacf into main Jun 20, 2024
3 checks passed
@ehoops-cz ehoops-cz deleted the csv-export-2 branch June 20, 2024 20:38
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.

Export to csv for import into napari
3 participants