text: user2621: I have a folder with 150 pairs of fastq files from an illumina sequence run. I need to precess them with mixcr, how can I do this in Bash with a single command?
  
  user16818: I would also suggest using GNU parallel as described in our guides :
  https://docs.milaboratories.com/mixcr/guides/generic-multiplex-bcr/#one-command-solution
  Briefly:
  ls /Documents/Data/Input/*_R1* | \
      parallel -j 4 \
      'mixcr analyze 
      …
      {} \
      {=s:R1:R2:=} \             
  {=s:.*/:/Documents/Data/result/:;s:_R.*::=}'
  
  That will take all fastq pairs from /Documents/Data/Input and put the result output files into /Documents/Data/result folder.
  
  user92: Here's how I'd approach this:
  for READ1 in /Documents/Data/Input/*R1*
  do
      READ2=${READ1/R1/R2}
      mixcr analyze amplicon --s hs \
          --starting-material dna \
          --5-end v-primers \
          --3-end j-primers \
          --adapters no-adapters \
          --receptor-type trb \
          --only-productive "$READ1" "$READ2"
  done
  
  Basically, loop over all the R1 FASTQ files in a directory, and calculate the R2 names as needed.
  This is using BASH string manipulation, and assumes that substituting R2 for R1 will correctly calculate the R2 filename from R1. It also assumes that all the FASTQ files are in a single directory.
  
original_text: 2621: <p>I have a folder with 150 pairs of fastq files from an illumina sequence run. I need to precess them with mixcr, how can I do this in Bash with a single command?</p>
   16818: <p>I would also suggest using <a href="https://www.gnu.org/software/parallel/" rel="nofollow noreferrer">GNU parallel</a> as described in our guides :</p>
  <p><a href="https://docs.milaboratories.com/mixcr/guides/generic-multiplex-bcr/#one-command-solution" rel="nofollow noreferrer">https://docs.milaboratories.com/mixcr/guides/generic-multiplex-bcr/#one-command-solution</a></p>
  <p>Briefly:</p>
  <pre><code>ls /Documents/Data/Input/*_R1* | \
      parallel -j 4 \
      'mixcr analyze 
      …
      {} \
      {=s:R1:R2:=} \             
  {=s:.*/:/Documents/Data/result/:;s:_R.*::=}'
  </code></pre>
  <p>That will take all fastq pairs from /Documents/Data/Input and put the result output files into /Documents/Data/result folder.</p>
   92: <p>Here's how I'd approach this:</p>
  
  <pre><code>for READ1 in /Documents/Data/Input/*R1*
  do
      READ2=${READ1/R1/R2}
      mixcr analyze amplicon --s hs \
          --starting-material dna \
          --5-end v-primers \
          --3-end j-primers \
          --adapters no-adapters \
          --receptor-type trb \
          --only-productive "$READ1" "$READ2"
  done
  </code></pre>
  
  <p>Basically, loop over all the R1 FASTQ files in a directory, and calculate the R2 names as needed.</p>
  
  <p>This is using BASH string manipulation, and assumes that substituting <code>R2</code> for <code>R1</code> will correctly calculate the R2 filename from R1. It also assumes that all the FASTQ files are in a single directory.</p>
  