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

script reusability outside snakemake #354

Open
jordandekraker opened this issue Jan 20, 2025 · 1 comment
Open

script reusability outside snakemake #354

jordandekraker opened this issue Jan 20, 2025 · 1 comment

Comments

@jordandekraker
Copy link
Collaborator

Currently all python scripts are interacted with using snakemake.inputs.x or snakemake.outputs.y. This makes them very annoying to use outside of a snakemake workflow, e.g., for one-time use or applying code to other projects. It would be nice to optionally use import argparse or import sys, getopt to parse these arguments instead at the top of each script.

@akhanf
Copy link
Member

akhanf commented Jan 21, 2025

That's the tradeoff with easy development of workflow scripts in snakemake -- instead of trying to make the snakemake scripts callable from outside, I think the better approach for established functions could be to put them in their own importable module, and the snakemake script can call it. Also anything outside hippunfold could also import them if we package it up appropriately.

The module ( or modules if we organize them into multiple files) themselves could be in inside the hippunfold package and repo still too (sibling to the snakemake workflow files perhaps), to keep things together for maintenance and testing.

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