carpentries-incubator / snakemake-novice-bioinformatics

Introduction to Snakemake for Bioinformatics
https://carpentries-incubator.github.io/snakemake-novice-bioinformatics
Other
18 stars 9 forks source link

Lesson 2 exercise trick question #28

Closed tbooth closed 2 years ago

tbooth commented 2 years ago

From Lana Talmane:

Hehe, this is sort of a pedantic thing, but in the lesson 2, Exercise “Choosing the right wildcards”, I know that the question 3 is meant to be a trick question, and it says in the answer that it is not possible, but it really is? With rule countreads:

output: "countreads_1.txt"
input : "reads/ref1_1.fq"
shell:
        "echo $(( $(wc –l <{input}) /4 )) > {output}"

I know here it does not use wildcards, but exercise does not ask to use wildcards necessarily, and it’s not like any of the learners are used to using them at this point. I think above solution is most obvious solution if you have just started using snakemake?