title: How to get the basename of the wildcard values in the snakemake output rule?
body: <p>In the following example, the output files will be created in the same location as the input files. Is there a way to get the basename of the wildcard value in the output section, so that I can use the basename of the input file to name the output file but write it to a different location?</p>
  
  <pre><code>infile=['/home/user/folder1/file1','/home/user/folder2/file2/']
  
  rule one:
   input: expand("{myfile}", myfile = infile)
  
   output: "{myfile}" + ".out"
  
   shell: "touch {wildcards.myfile}.out"
  </code></pre>