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

Improve Drop T dimension task #5

Open
3 tasks
jluethi opened this issue Mar 21, 2024 · 3 comments
Open
3 tasks

Improve Drop T dimension task #5

jluethi opened this issue Mar 21, 2024 · 3 comments

Comments

@jluethi
Copy link
Collaborator

jluethi commented Mar 21, 2024

Main improvements:

  • Add support for tables: Copy tables from old Zarr to new Zarr
  • Add support for labels (also with dimensionality dropping)?
  • Add support for overwrite_input

In Fractal V2:
Correctly update the image list

@BioinfoTongLI
Copy link

Hi @jluethi, I am trying to wrap some tasks into Nextflow and wondering how should I run this drop_T task via CLI?
I see that you've got this section for naive run. But I couldn't figure out what are the expected args

usage: drop_t_dimension.py [-h] --args-json ARGS_JSON --out-json OUT_JSON

I tried to give the img_list.json from the import_ome_zarr task and it said

zarr_url
  field required (type=value_error.missing)

Whic is expected I'd say since it's the arg in the function. But when I add that arg with or without flag, it said:

drop_t_dimension.py: error: unrecognized arguments:  [zarr_url]

I've actually managed to run it without your main section but a bespoke one. But I do think it's better to be in line with your canonical version.

@jluethi
Copy link
Collaborator Author

jluethi commented May 13, 2024

Hey @BioinfoTongLI

Using these tasks directly via Python seems like a totally fine way to go to me, unless you want to run them through Fractal server or a nextflow command of course. To be able to use it through the CLI, you'll need to provide the following as an ARGS_JSON:

{
  "zarr_url": "/path/to/zarr/file/myplate.zarr/B/03/0"
}

The zarr_url should be one of the contents of img_list.json, but it's formatted differently. e.g. it can contain a list of all the zarr_urls after the import task, while Drop T dimension is meant to be run per zarr_url.

And if you want to set any of the other arguments of that task (e.g. to set overwrite_input to True), also add this to that json

@BioinfoTongLI
Copy link

Hi Joel, I've noticed that the original metadata is parsed but not updated.
https://github.com/jluethi/fractal-helper-tasks/blob/main/src/fractal_helper_tasks/drop_t_dimension.py#L70
I am not sure if you've intentionally left the MD untouched to keep the raw. Or if it's just an overlook.
If it's the later, I can help adding this.

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

No branches or pull requests

2 participants