code: def run_bcl2fastq(run_folder, ss_csv, config):
      
      bc_dir = os.path.join(run_folder, "Data", "Intensities", "BaseCalls")
      output_dir = os.path.join(run_folder, "fastq")
  
      if not os.path.exists(os.path.join(output_dir, "Makefile")):
          subprocess.check_call(["configureBclToFastq.pl", "--no-eamss",
                                 "--input-dir", bc_dir, "--output-dir", output_dir,
                                 "--sample-sheet", ss_csv])
      with utils.chdir(output_dir):
          cores = str(utils.get_in(config, ("algorithm", "num_cores"), 1))
          cmd = ["make", "-j", cores]
          if "submit_cmd" in config["process"] and "bcl2fastq_batch" in config["process"]:
              _submit_and_wait(cmd, cores, config, output_dir)
          else:
              subprocess.check_call(cmd)
      return output_dir
docs: Run bcl2fastq for de-multiplexing and fastq generation.
      run_folder -- directory of Illumina outputs
      ss_csv -- Samplesheet CSV file describing samples.