Skip to content

Convert binary base call format files to fastq

Shintaro Katayama edited this page Jun 16, 2020 · 7 revisions

Binary base call format (BCL) files are raw data files by Illumina HiSeq/NextSeq/NovaSeq systems [link]. There are various tools to convert the BCL files to FASTQ files, and there is a service script in STRTprep. The following procedure is for the conversion in detail.

NOTE: It will take several hours to convert. If you want to disconnect the terminal during the convert, using a detachable terminal, for example, GNU screen, is highly recommended.

  1. Get the STRTprep (branch v3dev) package into a folder; into STRTprep3.test in this example.
git clone -b v3dev https://github.com/shka/STRTprep.git STRTprep3.test
  1. Place an extracted folder of BCL files into src folder; the BCL folder is ~/Downloads/200302_NS500683_0475_AHFMWFBGXF in this example.
cd STRTprep3.test
mv ~/Downloads/200302_NS500683_0475_AHFMWFBGXF src
  1. Download the latest picard.jar [link] and put it into bin folder.

  2. Make sure that you can run java.

java -jar src/picard.jar -h

Install java if you met error; here is an example in the case of Ubuntu Linux.

sudo apt-get update
sudo apt install openjdk-8-jre-headless
  1. Run the service script for each BCL folder and wait. The converted fastq files and the convert log will be created in the src folder.
bin/bcl2fastq_nextseq.sh 200302_NS500683_0475_AHFMWFBGXF

Clone this wiki locally