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

Scatter-gather documentation errors #1113

Open
jmarshall opened this issue Jul 28, 2021 · 2 comments
Open

Scatter-gather documentation errors #1113

jmarshall opened this issue Jul 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jmarshall
Copy link
Contributor

jmarshall commented Jul 28, 2021

The “Defining scatter-gather processes” documentation in docs/snakemake/rules.rst says

Thereby, scatter.split("splitted/{scatteritem}.txt") yields a list of paths "splitted/1-of-n.txt", "splitted/2-of-n.txt", …, depending on the number n of scatter items defined. Analogously, gather.split("splitted/{scatteritem}.post.txt"), yields a list of paths "splitted/0.post.txt", "splitted/1.pos.txt", …, which request the application of the rule intermediate to each scatter item.

For this to work, one assumes that both gather.split and scatter.split would need to generate the same list of filenames. So surely either both of them should be of the form 1-of-n, 2-of-n, etc or both of them should be of the form 0, 1, …, n-1.

There is also a minor typo: 1.pos.txt.

It would also be useful if the documentation noted the Snakemake version in which this facility became available, which appears to be v5.25.0.

@jmarshall jmarshall added the bug Something isn't working label Jul 28, 2021
@leonqli
Copy link

leonqli commented Aug 10, 2021

Any practical example of using scatter/gather.split? In the documentation, the "rule split" has no input file. Is it possible to split an input file into n parts, using linux command, split -n -d? Thanks!

@jmarshall
Copy link
Contributor Author

PR #1441 fixed the minor typo, but the filename inconsistency remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants