title: feed a command a comma separated list of file names in a directory, extract a variable motif from file names for labels
body: <p>I have a directory containing files that look like this:</p>
  
  <pre><code>1_reads.fastq
  2_reads.fastq
  89_reads.fastq
  42_reads.fastq
  </code></pre>
  
  <p>I would like to feed a comma separated list of these file names to a command from a python program, so the input to the python command would like this:</p>
  
  <pre><code>program.py -i 1_reads.fastq,2_reads.fastq,89_reads.fastq,42_reads.fastq
  </code></pre>
  
  <p>Furthermore, I'd like to use the numbers in the file names for a labeling function within the python command such that the input would look like this:</p>
  
  <pre><code>program.py -i 1_reads.fastq,2_reads.fastq,89_reads.fastq,42_reads.fastq -t s1,s2,s89,s42
  </code></pre>
  
  <p>Its important that the file names and the label IDs are in the same order.</p>