bcl2fastq converts BCL files to fastq files used by most downstream software. bcl2fastq creates a number of files summarizing statistics of the conversion in the InterOp folder of the run folder. They can be examined with the Illumina Sequence Analysis Viewer.

Documentation

User Guide from Illumina

Slurm script

#!/bin/bash
#SBATCH --job-name=bcl2fastq
#SBATCH --time=1:00:00
#SBATCH --partition=norm
#SBATCH --ntasks=16
#SBATCH --mem=64GB
module load bcl2fastq/2.20.0
bcl2fastq --runfolder-dir <runfolder> \
          --output-dir <basecalls> \
          -r 4 -w 4 -p 8 \
          --barcode-mismatches 1

Build instructions for those who are curious

Log in to Illumina support at https://support.illumina.com
Download from https://support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software/downloads.html
unzip bcl2fastq2-v2-20-0-tar.zip && tar xf bcl2fastq2-v2.20.0.422-Source.tar.gz
mkdir -p bcl2fastq/build; cd bcl2fastq/build
../src/configure --prefix=/mnt/nasapps/production/bcl2fastq2/2.20.0
edit ../src/cxx/include/common/Logger.hh and add #include <iostream>
edit ../src/cxx/lib/io/Xml.cpp and delete lines
-#ifndef WIN32
- boost::property_tree::write_xml(os, treeWithIndexAttributes, boost::property_tree::xml_writer_make_settings(' ', 2));
-#else
#endif


 -#ifndef WIN32  - boost::property_tree::write_xml(os, tree, boost::property_tree::xml_writer_make_settings(' ', 2));
 -#else
 -#endif
make -j 8 && make install