title: Snakemake: How do I get a shell command running with different arguments (integer) in a rule?
body: <p>I'm trying to research the best hyperparameters for my boosted decision tree training. Here's the code for just two instances:</p>
  <pre><code>user = '/home/.../BDT/'
  
  nestimators = [1, 2]
  
  rule all:
          input: user + 'AUC_score.pdf'
  
  rule testing:
          output: user + 'AUC_score.csv'
          shell: 'python bdt.py --nestimators {}'.format(nestimators[i] for i in range(2))
  
  rule plotting:
          input: user + 'AUC_score.csv'
          output: user + 'AUC_score.pdf'
          shell: 'python opti.py
  </code></pre>
  <p>The plan is as follows:
  I want to parallelize the training of my BDT with a bunch of different hyperparameters (for the beginning I just want to start with nestimators). Therefore I try to use the shellcommand to train the bdt. bdt.py gets the argument for training, trains and saves the hyperparameters + training score in a csv file. In the csv file I can look which hyperparameters give the best scores. Yej!</p>
  <p>Sadly it doesn't work like that. I tried to use the input function but since I want to give an integer it does not work. I tried it the way you can see above but know I get an 'error message' : 'python bdt.py --nestimators &lt;generator object  at 0x7f5981a9d150&gt;'. I understand why this doesn't work either but I don't know where to go from here.</p>