-
Notifications
You must be signed in to change notification settings - Fork 13
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
Better snakemake cluster submission support #129
Conversation
better snakemake cluster submission
localrules - how did I miss that before. Great.
…On Aug 29 2023, at 12:14 pm, Rhys Newell ***@***.***> wrote:
@rhysnewell approved this pull request.
—
Reply to this email directly, view it on GitHub (#129 (review)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAADX5A4QGOLQVYITY76KIDXXVGCHANCNFSM6AAAAAA4CEQWC4).
You are receiving this because your review was requested.
|
stdout/err from cluster jobs isn't captured in main log
they seem to get many bins, so worth trying
Let me know when you're ready for this to be reviewed |
run all other independent jobs when job errors
@rhysnewell @wwood Found a bug in snakemake where it solves the dag and then exits with no error. Only happened with >1 binner with cluster-submission. After much debugging, it turns out that its because the refinery rules don't have the Anyway, solution is to either add the refinery rules to |
Who wrote them in according to git blame? I thought they were only for cluster/cloud submission, so probably best to delete, I think, but maybe there's a reason I don't appreciate. |
@rhysnewell @wwood Ran integration tests: test_short_read_recovery, test_long_read_recovery and test_short_read_recovery_queue_submission all pass. The only issue I see now is that the refinery logs (from rosella_refinery.py) are all empty. Not sure why, since I used the same logging method as run_checkm.py, etc., and their logs are populated. |
I just had a quick look, and stdout is being written to the log file for both the run_checkm and refine_rosella rules. All logging info for rosella comes from stderr, so you'd need to pipe stderr to the log file. Stdout should generally remain empty for a rosella run. I could be incorrect though, just from a glance |
The stdout and stderr should both be going to log files since stderr is redirected to STDOUT. I did that since some of the tools aren't well-behaved... subprocess.run(
f"checkm2 predict -i {bin_folder}/ -x {bin_ext} -o {output_folder} -t {threads} --force".split(),
env=os.environ,
stdout=logf,
stderr=subprocess.STDOUT
) |
Ah gotcha, hmm. I guess you'd have to check firstly that the log output isn't just being piped somewhere, and secondly that the refinement is even running? Like it might be getting skipped in your tests due to lack of bins or something |
Hah, yeh of course. The input CheckM files are empty. I'll log that refinement is being skipped. |
@rhysnewell @wwood I think its ready. Good luck reading +1191/-676 lines, at least most of them are just removing groups and adding resources/logs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Sam, thanks for all this work. I didn't have time to go through each and every line, but the ones I looked at were good.
Happy to see there's further testing going on too.
I've only really requested a bit more documentation, I think a short example on using the cluster profile would work well enough.
Beyond this, I think it would be worth gathering a list of advantages of Aviary over other workflows, and listing those on the README. Can you please make a start on that, maybe in another PR?
Ta
base_group.add_argument( | ||
'--snakemake-profile', | ||
help='Snakemake profile (see https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles)\n' | ||
'Create profile as `~/.config/snakemake/[CLUSTER_PROFILE]/config.yaml`. \n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear whether you mean the user or aviary does the creating. I think an example yml in the doco would go a long way here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some stuff under Advanced Usage. Is that what you wanted?
Sounds good, but maybe add a subtitle rather than just advanced usage. Also, is this still true? From that same doc. Would be worth adding a few words to say that it is only sorta true e.g. reruns in a cluster mode are requeued asking for increasingly more RAM
|
@wwood |
Add rule to localrules if simple, otherwise add resources with estimated cpu/mem/time.
Not sure about all the long-reads assemblies resources.
--profile qsub --retries 3
, where profile points to~/.config/snakemake/qsub/config.yaml
which contains cluster, cluster-status, jobs, cluster-cancel and other snakemake arguments