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

Add browse dataset option #216

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

Conversation

danielquintao
Copy link

This Pull Request aims at providing an alternative experience for addind a new dataset in the server mode (cirro serve) when the server machine has a directory where datasets must be browsed from.

Precisely, by providing the option --datadir <some directory> to cirro serve, the text input "URL" is replaced by a select input with the valid datasets within <some directory> (whether they are first children or not; I used os.walk to find all interesting datasets, which can be files or specialy formatted directories such as .zarr ones). The UI looks like this with the new option:

image

I didn't have to change many files to do so, and both my manuel tests and the existing pytest tests passed. However, I have two important comments:

  • I am not an expert on single cell data files. I tried to filter the files and directories inside the data folder passed as argument to only show to the user those that correspond to h5ad, 10x h5, Xenium, loom, Seurat, or zarr format as in the official cirrocumulus docs.
    For most of them, I simply checked for the extension. For Xenium, which accepts the MEX format, I had to add some extra lines of code to verify the extensions of the files that are inside the MEX-candidate, since the MEX directory properly said has no special extension. Feel free to inspect cirrocumulus/api.py to see if the included logic seems fine.
  • Although existing pytest tests passed, I haven't added new ones (I tested adding the data set only manually, both with the new option and in the original way).

@danielquintao
Copy link
Author

Hello!

Are there any news concerning the revision of this PR? Please do not hesitate in telling me if there are any needed fixes. I hope you find the new feature carried by the PR useful.

Regards

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.

1 participant