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

Samples viewer #50

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open

Samples viewer #50

wants to merge 74 commits into from

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Sep 6, 2024

Work in progress; Exploring options for showing summary of sample data.

Deployed at e.g. https://samples-viewer--ome2024-ngff-challenge.netlify.app/?csv=https://raw.githubusercontent.com/will-moore/ome2024-ngff-challenge/samples_viewer/samples/idr0157_samples.csv

You can update the query string to point at any other csv, which simply expects a URL on each row.

There is a web page that loads the "master" csv via query string ?csv=https://raw.githubusercontent.com/will-moore/ome2024-ngff-challenge/samples_viewer/samples/ngff_samples.csv and recursively follows links to any other csvs.

Web page is a Svelte.js app - probably a bit of an overkill just now, but makes it easier to grow.

Currently, we display data like this (screenshot below) - Some of the earlier samples here don't have written bytes info as that came later.

Questions etc: We need to make a bunch of http requests for each sample row in the table, and we are currently ONLY loading the highest resolution array - bytes written to other resolutions are ignored:

  • for each plate row: 3 requests: plate, multiscales (field 0 from first well), array
  • for each bioformats2raw layout: 3 requests: bf2raw, multiscales (0 only), array
  • multiscales rows: 2 requests: multiscales and array
  • ro-crate-metadata.json is loaded on request (button).

Not yet loading:

This approach gives a nice summary for a reasonable number of samples, but in it's current form it won't scale very nicely for all the data we're planning to show. E.g, it will take a long time to get summary data for all the samples.

We could probably load the URLs for all samples (load ALL the CSVs) and say "10k samples" and then load the samples themselves incrementally, e.g. as you scroll through the list, or random slide-show etc.

NB: I have got netlify to deploy from this branch. Need to get OME's netlify to deploy from main once merged.

See screenshots below for latest changes...

@joshmoore
Copy link
Member

@will-moore: what's the best way to review? Is there a URL somewhere?

@will-moore
Copy link
Member Author

We need to activate netlify to build it, same as for ngff-validator... You have an OME account for netlify?

@will-moore
Copy link
Member Author

@joshmoore Need to somehow point netlify at the ome2024-ngff-challenge directory below the parent repo.

@joshmoore
Copy link
Member

image

Command: npm run build

5:03:40 PM: Failed during stage 'Reading and parsing configuration files': 
When resolving config:
Base directory does not exist: /opt/build/repo/ome2024-ngff-challenge

: exit status 1

@will-moore
Copy link
Member Author

I think it's maybe trying to build the main branch, which doesn't yet contain the app?
I'm just trying to get netlify to build my branch directly. The build completed but the app isn't loading for some reason..
Let me look at it for a bit....

Copy link

netlify bot commented Sep 10, 2024

Deploy Preview for euphonious-mochi-664405 ready!

Name Link
🔨 Latest commit 3423248
🔍 Latest deploy log https://app.netlify.com/sites/euphonious-mochi-664405/deploys/67000577d52e8900088fc8cf
😎 Deploy Preview https://deploy-preview-50--euphonious-mochi-664405.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@will-moore
Copy link
Member Author

OK, I got it to deploy at https://66e06a54f9201459706a0106--ome2024-ngff-challenge.netlify.app/?csv=https://raw.githubusercontent.com/will-moore/ome2024-ngff-challenge/samples_viewer/samples/ngff_samples.csv

Some of the key settings (apart from specifying to just use build this branch from my repo):

Base directory: ome2024-ngff-challenge
Build command: npm run build
Publish directory: ome2024-ngff-challenge/dist

@will-moore
Copy link
Member Author

@joshmoore That doesn't look quite right. I think it's the same problem I had initially - serving src etc instead of from /dist. E.g. https://deploy-preview-50--euphonious-mochi-664405.netlify.app/src/App.svelte is available.
Do you have the Publish directory: ome2024-ngff-challenge/dist ?

@will-moore
Copy link
Member Author

Also, you can give the netlify app a name instead of the random one it generates. I think I might have claimed ome2024-ngff-challenge in my testing, but you can pick something similar?

@joshmoore
Copy link
Member

joshmoore commented Sep 11, 2024

@sbesson suggested during the call adding a "provider" or "source" column to the default view.

Thinking of the implementation of that, @will-moore, Can we have:

  • top-level .csv: 2 columns, source & path/link to .csv
  • nested .csv: path/link to .zarr

i.e., no mixing at the top-level?

@will-moore
Copy link
Member Author

After that commit: loading ro-crate-metadata.json (on user request, so as not to make too many requests initially).
Also showing a summary of counts:
https://samples-viewer--ome2024-ngff-challenge.netlify.app/?csv=https://raw.githubusercontent.com/will-moore/ome2024-ngff-challenge/samples_viewer/samples/idr0157_samples.csv

Screenshot 2024-09-11 at 13 31 33

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/ome2024-ngff-challenge/97363/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.

6 participants