title: Snakemake wildcards
body: <p>Please, can anybody explain what the **wildcards in the code below does. Also, I have come across both &quot;*wildcards&quot; and &quot;**wildcards&quot;, how are they different?.</p>
  <p>In this case, does **wildcards mean wildcards.sample?</p>
  <pre><code>def STAR_input(wildcards):
      if config[&quot;PE_or_SE&quot;] == &quot;SE&quot;:
          fq1=&quot;analysis/trimmed_data/{sample}_R1_trimmed.fq.gz&quot;.format(**wildcards)
          return fq1
      elif config[&quot;PE_or_SE&quot;] == &quot;PE&quot;:
          fq1 = &quot;analysis/trimmed_data/{sample}_R1_val_1.fq.gz&quot;.format(**wildcards)
          fq2 = &quot;analysis/trimmed_data/{sample}_R2_val_2.fq.gz&quot;.format(**wildcards)
          return [fq1,fq2]
  </code></pre>