title: Snakemake multiple Config Files?
body: <p>Quick question regarding snakemake and using more than one config file.</p>
  <p>I'm creating a rather large pipeline for genomic preProcessing, and the idea is that it is user-friendly and accounts for the lowest-common-denominator in terms of user ability.</p>
  <p>So, instead of allowing the user to define in the main configfile, the threads used by certain tools.  I want to implement snakemake's &quot;workflow.cores * percentage&quot; capabilities, that is; I can for each tool specify a percentage of the total cores (as defined in the command line with --cores #).</p>
  <p>This keeps things simple and doesn't confuse the user with all the options in the main config file.  But I still want to allow for the user to fine-tune the number of threads if they so please.  The idea is I have a main config file without the thread numbers, and a second config file with the thread numbers.</p>
  <p>If the user decides they want to use their own decided number of threads, they will simply (in the main config) provide an affirmative in a key that's something like: manualThreadChoice: &quot;yes&quot;</p>
  <p>And have a simple if statement in the Snakefile that will, if the manualThreadChoice is affirmative, then provide the number of threads to the respective rules accordingly, otherwise just use the automatically defined thread percentages.</p>
  <p>According to this question on biostars: <a href="https://github.com/yanailab/celseq2/issues/33" rel="nofollow noreferrer">https://github.com/yanailab/celseq2/issues/33</a></p>
  <p>There is now the ability for defining more than one config file.</p>
  <p>See comment:</p>
  <p>&quot;Thank you for reporting this issue. This is because snakemake updates their API which supports multiple config files now. Based on their log, the configfile was changed to configfiles. See: snakemake/snakemake@23624ee#diff-88e96378bf2405c8a8f8ac971519039e.&quot;</p>
  <p>So instead of calling our config file with</p>
  <pre><code>configfile: &quot;path/to/config.yaml&quot;
  </code></pre>
  <p>we can use:</p>
  <pre><code>configfiles: 
  </code></pre>
  <p>My question is, do we then provide two separate paths as part of a list of files:
  i.e.</p>
  <pre><code>configfiles: [&quot;path/to/config1.yaml&quot;, &quot;path/to/config2.yaml&quot;]
  </code></pre>
  <p>And how do we then access key from our different configs.  Since with single config files we would use:</p>
  <pre><code>config['key']
  </code></pre>
  <p>I've tried to access the different config files with indexing:</p>
  <pre><code>config[0]['key']
  </code></pre>
  <p>but this doesn't work.</p>
  <p>I'm using Snakemake 5.7.0 which I believe is a version that has this multiple config files ability.</p>