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

Inconsistent input/output argument order #219

Open
hyanwong opened this issue May 23, 2024 · 6 comments
Open

Inconsistent input/output argument order #219

hyanwong opened this issue May 23, 2024 · 6 comments

Comments

@hyanwong
Copy link

Using the (undocumented) python API:

vcf2zarr.convert(input_vcfs, output_zarr)
vcf2zarr.explode(output_icf, input_vcfs)  # this has output path as first param, input as second?
vcf2zarr.encode(input_icf, output_zarr)

I think vcf2zarr.explode should probably reverse the order of the first 2 params? I guess since it's undocumented, it's possible to make changes like this without breaking the API at this stage?

@jeromekelleher
Copy link
Contributor

Yes, well spotted. I've been debating with myself on what should be done here. It's not quite so obvious when you look at explode_init, explode_partition etc, where it makes sense for the "self" reference to be the first argument.

See #102 for a related problem that I've been dithering about

@jeromekelleher
Copy link
Contributor

I wouldn't write any code using the Python API by the way, it will definitely change in breaking ways before being documented.

@hyanwong
Copy link
Author

I wouldn't write any code using the Python API by the way, it will definitely change in breaking ways before being documented.

Thanks. I gathered that it's undocumented, so I'm expecting changes. The context is that I'm very roughly drafting some examples for teaching in a few months, so I'm happy to change any code as/when it is documented.

@jeromekelleher
Copy link
Contributor

Would it not be easier to use the CLI? Bash cells in Jupyter notebooks work well.

@hyanwong
Copy link
Author

Ah yes, probably sensible in this case. I'm not sure how they work in jupyterbook or pyodide formats, but that might not be needed in this case.

@jeromekelleher
Copy link
Contributor

Doubt cyvcf2 will work in pyodide anyway.

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