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

Introduce lists of inputs/outputs before named inputs and outputs #64

Open
tbooth opened this issue Jul 26, 2024 · 1 comment
Open

Introduce lists of inputs/outputs before named inputs and outputs #64

tbooth opened this issue Jul 26, 2024 · 1 comment
Labels
reviewer Issues arising from comments on https://github.com/carpentries-lab/reviews/issues/17

Comments

@tbooth
Copy link
Collaborator

tbooth commented Jul 26, 2024

From @cmeesters:

[in ep03] we get to named in- and output without explaining the background or that in- and output are usually lists.

@tbooth
Copy link
Collaborator Author

tbooth commented Jul 26, 2024

I'm not sure what "the background" is here, but it is true that many new users of Snakemake will use lists where they need multiple inputs and outputs, resulting in shell commands like:

"kallisto quant -i {input[0]} -o kallisto.{wildcards.sample} {input[1]} {input[2]}"

rather than the much more readable:

"kallisto quant -i {input.index} -o kallisto.{wildcards.sample} {input.fq1} {input.fq2}"

So I'd say this is a feature of the course, not a bug. We're introducing things in this order:

  1. Input and output are single files (in ep01)
  2. Actually you can have multiple input and/or output files and assign them names (in ep03)
  3. Actually you can use a list, if the number of input of files is variable (in ep05)

There are some funky cases where we actually need the output of a rule to be a list, but these are not for an intro course!

I'll add exposition to this effect to the instructor notes.

@tbooth tbooth added the reviewer Issues arising from comments on https://github.com/carpentries-lab/reviews/issues/17 label Jul 26, 2024
tbooth added a commit that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewer Issues arising from comments on https://github.com/carpentries-lab/reviews/issues/17
Projects
None yet
Development

No branches or pull requests

1 participant