-
Notifications
You must be signed in to change notification settings - Fork 32
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
Command-line interface (CLI) with plugins #53
Comments
click-contrib/click-plugins looks to be one way to accomplish this task. |
Also it's not necessary but if we are going to invest in the CLI as an interface we may want to make use of a library like willmcgugan/rich to ensure we make effective use of all of the capabilities of the shell/terminal/console. |
Re plugins, I think we should make the interface more tightly defined than plugging in some script to the CLI. Each format plugin should provide:
The only extra thing we'd need apart from these functions in order to make a functioning CLI like |
re PLINK conversion CLI: While these are out of scope for what a simple CLI would likely want to support, I wanted to share the edge cases that came up in importing UKB PLINK for future reference. This could be good "first issue" work in future CLI enhancements:
My preamble before Zarr writes looks like this: path = osp.join(data_dir, f'ukb_chr{contig_name}.zarr')
store = gcsfs.GCSMap(path, gcs=gcs, check=False, create=True)
compressor = zarr.Blosc(cname='zstd', clevel=3, shuffle=2)
encoding = {v: {'compressor': compressor} for v in ds}
logger.info(f'Writing dataset for contig {contig} to {path}')
with dask.config.set(scheduler='processes'), ProgressBar():
ds.to_zarr(store=store, mode='w', consolidated=True, encoding=encoding) which could be fairly easy to parameterize. |
Resurrecting this, I think a CLI to do basic conversion and dataset inspection/summary would be really handy. Is anyone dead-against the idea of this, or should I create a batch of issues to track? |
We discussed this on the dev call today, and the consensus was that a basic CLI with to do inspection and data format conversion would be useful. Things have moved on since this issue, so I'm going to close this and open some new ones. |
The discussion in sgkit-dev/sgkit-plink#8 made it clear it would be nice to have a CLI with plugins to support IO and other operations.
The text was updated successfully, but these errors were encountered: