<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marija Maricic on Medium]]></title>
        <description><![CDATA[Stories by Marija Maricic on Medium]]></description>
        <link>https://medium.com/@marija190396?source=rss-648c97600d36------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lEUPny8DCdmtiXdt.jpg</url>
            <title>Stories by Marija Maricic on Medium</title>
            <link>https://medium.com/@marija190396?source=rss-648c97600d36------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 18:05:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marija190396/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BCL to FASTQ conversion]]></title>
            <link>https://medium.com/@marija190396/bcl-to-fastq-conversion-e289852823d0?source=rss-648c97600d36------2</link>
            <guid isPermaLink="false">https://medium.com/p/e289852823d0</guid>
            <dc:creator><![CDATA[Marija Maricic]]></dc:creator>
            <pubDate>Mon, 08 Jul 2019 21:15:00 GMT</pubDate>
            <atom:updated>2019-07-08T23:08:50.195Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Illumina sequencing technology uses cluster generation and sequencing by synthesis chemistry to sequence millions or billions of clusters on a flow cell, depending on the sequencing platform. During sequencing, for each cluster, base calls are made and stored for every cycle of sequencing by the Real-Time Analysis (RTA) software on the instrument. RTA stores the base call data in the form of individual base call (or BCL) files. When sequencing completes, the base calls in the BCL files must be converted into sequence data. This process is called BCL to FASTQ conversion.</p><h4><strong>Multiplex sequencing</strong></h4><p>Multiplex sequencing allows large numbers of libraries to be pooled and sequenced simultaneously during a single run on a high-throughput instrument. With multiplexed libraries, unique index sequences are added to each DNA fragment during library preparation so that each read can be identified and sorted before final data analysis. Pooling samples exponentially increases the number of samples analysed in a single run, without drastically increasing cost or time.</p><p>Gains in throughput from multiplexing come with an added layer of complexity, as sequencing reads from pooled libraries need to be identified and sorted computationally in a process called demultiplexing before final data analysis. The phenomenon of index misassignment between multiplexed libraries is a known issue that has impacted NGS technologies from the time sample multiplexing was developed.</p><h4>BCL and FASTQ file formats</h4><p>Binary Base Call (BCL) files are the raw data files generated by the Illumina sequencers. The Real Time Analysis (RTA) software writes the base and the confidence in the call as a quality score to base call (.bcl) files. As the name implies this is done in real time, i.e. for every cycle of the sequencing run a call for every location identified on the flow cell (tiles and lanes) is added. BCL files are stored in binary format and represent the raw data output of a sequencing run.</p><p>The FASTQ is a text-based sequence file format that is generated from the BCL file that stores both raw sequence data and quality scores. For a single-read run, one FASTQ file is created for each sample per flow cell lane. For a paired-end run, two FASTQ files are created for each sample for each lane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*BcaMy4nUFfqJYrjDtWx5fg.png" /><figcaption>FASTQ file example</figcaption></figure><p>Each entry in a FASTQ files consists of 4 lines:</p><ul><li>A sequence identifier with information about the sequencing run and the cluster. The exact contents of this line vary based on the BCL to FASTQ conversion software used.</li><li>The sequence (the base calls; A, C, T, G and N).</li><li>A separator, which is simply a plus (+) sign.</li><li>The base call quality scores. These are Phred +33 encoded, using ASCII characters to represent the numerical quality scores.</li></ul><h3>Conversion tools</h3><h3>CASAVA</h3><p>Illumina’s <strong><em>CASAVA</em></strong><em> </em>software package was used for bcl-to-fastq conversion (among other things that these package provides). With the newer sequencing instruments came compressed bcl files that CASAVA could not handle. Illumina now provides a <strong><em>bcl2fastq </em></strong>software package which only includes the components of CASAVA required for FASTQ conversion and which can also deal with compressed bcl files.</p><h3>bcl2fastq</h3><p>The Illumina bcl2fastq Conversion Software demultiplexes sequencing data and converts BCL files into FASTQ files. bcl2fastq v1.8.4 is derived from CASAVA and it’s fully compatible with the alignment and variant calling components of CASAVA 1.8. The bcl2fastq v1.8.4 can be used for converting from any Illumina sequencing system running RTA v1.18.54, or earlier. For newer versions of RTA, bcl2fastq2 v2.20 has to be used.</p><h4>bcl2fastq v1.8.4</h4><p>Bcl conversion and demultiplexing is done in a single step, and generates a new directory in the Run folder, which contains all of the demultiplexed compressed FASTQ files.</p><p><strong><em>Folder and File Naming</em></strong></p><p>The top level run folder name is generated using three fields to identify the &lt;<em>ExperimentName</em>&gt;, separated by underscores. For example: <em>YYMMDD_&lt;machine_name&gt;_NNNN.</em> You should not deviate from the run folder naming convention, as this may cause the software to stop.</p><ol><li>The first field is a six-digit number specifying the date of the run.</li><li>The second field specifies the name of the sequencing machine. It may consist of any combination of upper or lower case letters, digits, or hyphens, but may not contain any other characters (especially not an underscore).</li><li>The third field is a four-digit counter specifying the experiment ID on that instrument.</li></ol><p><strong><em>Bcl Conversion Input Files</em></strong></p><p>Demultiplexing needs a BaseCalls directory and a sample sheet to start a run.</p><p><strong><em>BaseCalls Directory <br></em></strong>Demultiplexing requires a BaseCalls directory containing the binary base call files (BCL files) as generated by RTA, OLB (Off-Line Basecaller), or RTAOLB. The BCL to FASTQ converter needs the following input files from the BaseCalls directory:</p><ul><li>BCL files.</li><li>*.stats files.</li><li>*.filter files.</li><li>*.control files</li><li>*.clocs, *.locs, or *_pos.txt files. The BCL to FASTQ converter determines which type of position file it looks for based on the RTA version that was used to generate them.</li><li>RunInfo.xml file. The RunInfo.xml is at the top level of the run folder.</li><li>config.xml file. RTA is configured to copy these files off the instrument computer machine to the BaseCalls directory on the analysis server.</li></ul><p><strong><em>Sample sheet<br></em></strong>The sample sheet (SampleSheet.csv file) directs the software how to assign reads to samples, and samples to projects. The sample sheet specifies for every index in every lane which sample and which project it belongs to. Lanes with samples that were not indexed can also be assigned to samples and projects using the sample sheet. It is needed only if the demultiplexing needs to be preformed. The sample sheet should be located in the BaseCalls directory of the run folder. Alternatively the location of the file can be specified with the — sample-sheet option.</p><p>You can create, open, and edit the sample sheet in Excel, but it is easier and recommended to use the <strong>Illumina Experiment Manager</strong> (IEM) to create them. IEM is a wizard-driven application that guides you through the creation and setup of your sample sheet. More information can be found <a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/iem/illumina-experiment-manager-software-guide-15031335-08.pdf">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*KyeAtJrAmUIgG1JddOvY_w.png" /><figcaption>Sample sheet columns</figcaption></figure><p><strong><em>Conversion</em></strong></p><p>Bcl conversion and demultiplexing is configured by script <strong>configureBclToFastq.pl</strong>.<br>The standard way to run bcl conversion and demultiplexing is to first create the necessary Makefiles, which configure the run. Then you run make on the generated files, which executes the calculations.</p><p>One example of creating make file - run the command:</p><p><em>configureBclToFastq.pl /<br> — input-dir &lt;path_to_BaseCalls_dir&gt; /<br> — output-dir &lt;path_to_output_dir&gt; /<br> — sample-sheet &lt;path_to&gt;/SampleSheet.csv</em></p><p>This will create the named output directory containing a Makefile which performs the actual conversion; to run, ‘cd’ to the output directory and then run make.</p><p>There is a large number of options that can be used with this command. Information on all of theme can be found in the <a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq_letterbooklet_15038058brpmi.pdf">software guide</a>.<br>Some of them are:</p><ul><li><em>— i, — — input-dir</em> <em>&lt;Path to a BaseCalls directory&gt;</em>. Defaults to current directory.</li><li><em>— o, — — output-dir &lt;Path to demultiplexed output&gt;</em>.Defaults to &lt;run_folder&gt;/Unaligned.</li><li><em>— s, — — sample-sheet &lt;Path to sample sheet file&gt;</em>. Defaults to &lt;input_dir&gt;/SampleSheet.csv. Needed only for demultiplexing.</li><li><em>— mismatches &lt;n, n, n…&gt;.</em> Number of mismatches allowed for each read; the default is zero (recommended for samples without multiplexing), 1 mismatch is recommended for multiplexed samples with tags of length 6 bases.</li><li><em>— ignore-missing-bcl.</em> Interpret missing *.bcl files as no call.</li></ul><p><strong><em>Bcl Conversion Output Folder</em></strong></p><p>The Bcl Conversion output directory has the following characteristics:</p><ul><li>The project and sample directory names are derived from the sample sheet.</li><li>The Unaligned/Basecall_Stats_FCID/Demultiplex_Stats.htm file shows where the sample data are saved in the directory structure.</li><li>The Undetermined_indices directory contains the reads with an unresolved or erroneous index.</li><li>If no sample sheet exists, the software generates a project directory named after the flow cell, and sample directories for each lane.</li></ul><p><strong><em>Output FASTQ Files</em></strong></p><p>bcl2fastq converts *.bcl files into FASTQ files, which can be used as sequence input for alignment. The files are located in the <em>Unaligned/Project_&lt;ProjectName&gt;/Sample_&lt;SampleName&gt;</em> directories. Illumina FASTQ files use the following naming scheme:<br><em>&lt;sample name&gt;_&lt;barcode sequence&gt;_L&lt;lane&gt;_R&lt;read number&gt;_&lt;set number&gt;.fastq.gz</em></p><h4>Upgrade to bcl2fastq2</h4><p>Some key features that are only available in bcl2fastq2 v2.17 and later are:</p><ul><li>Demultiplex runs from all sequencing platforms running RTA v1.18.54 and later.</li><li>Demultiplex runs with mixed index types (eg, 6 bp and 8 bp) in different lanes in the sample sheet in a single analysis.</li><li>Handle unique molecular identifiers (UMIs) in FASTQ files via a sample sheet setting.erences between bcl2fastq v1.8.4 and bcl2fastq2 v2.17 and later</li></ul><p>Also, one of the key differences is the required sample sheet format. To be sure that the format is correct always use<a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/iem/illumina-experiment-manager-software-guide-15031335-08.pdf"> <em>Illumina Experiment Manager (IEM)</em></a> for generating sample sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*NXhRLJT8xOOWUZVrMNrVow.png" /><figcaption>Sample sheet format for bcl2fastq v1.8.4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*PazKB4554PhcQUDT6lHxWA.png" /><figcaption>Sample sheet format for bcl2fastq2 v2.17 and later</figcaption></figure><p>Other differences can be seen in the table below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*b2GvQj67zyNlDTCLRBPqcQ.png" /></figure><h4>bcl2fastq2 v2.20</h4><p>There are many similarities with the bcl2fastq v1.8.4 so we will highlight only differences here.</p><p><strong><em>Folder and File Naming</em></strong></p><p>Output folder naming convention depends on the system and can include the same variables listed in the bcl2fastq v1.8.4. As a best practice, give experiments and samples unique names to prevent naming conflicts.</p><p><strong><em>Bcl Conversion Input Files</em></strong></p><p>The following table lists the output files that comprise sequencing data. The bcl2fastq2 Conversion Software uses these output files as input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*S1074exsfk5m3Sg2WKG1fg.png" /></figure><p><strong><em>Sample sheet<br></em></strong>The new sample sheet format allows specification of more settings than it was able in the previous version. It has 2 main sections:</p><ul><li>Settings Section — The software uses the Settings section of the sample sheet to specify adapter trimming, cycle, UMI, and index options.</li><li>Data Section — The software uses columns in the Data section to sort samples and index adapters.</li></ul><p><strong><em>Conversion</em></strong></p><p>The conversion is done by running a command <strong>bcl2fastq.</strong><br>Add command options to modify the software operation as needed. If you add options that have a corresponding sample sheet setting, the command-line value overwrites the sample sheet value. Besides options from the previous version (like specifying the output or input directory), there are some new and interesting ones. One of them are options for threads:</p><ul><li><em>— r, — — loading-threads &lt;n&gt;</em>. Number of threads to load BCL data</li><li><em>— p, — — processing-threads &lt;n&gt;</em>. Number of threads to process demultiplexing data.</li><li><em>— w, — — writing-threads &lt;n&gt;</em>. Number of threads to write FASTQ data. This number must be lower than number of samples.</li></ul><p>For more options, check the <a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq2-v2-20-software-guide-15051736-03.pdf">software guide</a>.</p><p><strong><em>Bcl Conversion Output</em></strong></p><p>The bcl2fastq2 Conversion Software v2.20 generates the following files as output:</p><ul><li>FASTQ files</li><li>InterOp files</li><li>ConversionStats file</li><li>DemultiplexingStats file</li><li>Adapter Trimming file</li><li>FastqSummary and DemuxSummary</li><li>HTML reports</li><li>JavaScript Object Notation (JSON) file</li></ul><p><strong><em>Output FASTQ files</em></strong></p><p>The software writes compressed, demultiplexed FASTQ files to the directory <em>&lt;run folder&gt;\Data\Intensities\BaseCalls</em>.</p><ul><li>If a sample sheet specifies the <em>Sample_Project</em> column for a sample, the software places the FASTQ files for that sample in the directory<em> &lt;run folder&gt;\Data\Intensities\BaseCalls\&lt;Project&gt;</em>. The same project directory contains the files for multiple samples.</li><li>If the <em>Sample_ID </em>and <em>Sample_Name</em> columns are specified but do not match, the FASTQ files reside in a <em>&lt;SampleID&gt;</em> subdirectory where files use the <em>Sample_Name</em> value.</li><li>Reads with unidentified index adapters are recorded in one file named <em>Undetermined_S0_</em>. If a sample sheet includes multiple samples without specified index adapters, the software displays a missing barcode error and ends the analysis.</li></ul><p>FASTQ files are named by the following convention: <em>&lt;samplename&gt;_S&lt;sample number&gt;_L&lt;lane number&gt;_R&lt;read number 1 or 2&gt;_001.fastq.gz.</em></p><h4>References</h4><p>[1] <a href="https://www.illumina.com/informatics/sequencing-data-analysis/sequence-file-formats.html">https://www.illumina.com/informatics/sequencing-data-analysis/sequence-file-formats.html</a></p><p>[2] <a href="https://www.illumina.com/documents/products/illumina_sequencing_introduction.pdf">https://www.illumina.com/documents/products/illumina_sequencing_introduction.pdf</a></p><p>[3] <a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq_letterbooklet_15038058brpmi.pdf">https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq_letterbooklet_15038058brpmi.pdf</a></p><p>[4] <a href="https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq2-v2-20-software-guide-15051736-03.pdf">https://support.illumina.com/content/dam/illumina-support/documents/documentation/software_documentation/bcl2fastq/bcl2fastq2-v2-20-software-guide-15051736-03.pdf</a></p><p>[5] <a href="https://support.illumina.com/bulletins/2016/10/upgrading-from-bclfastq-v-to-bclfastq-v-or-later.html">https://support.illumina.com/bulletins/2016/10/upgrading-from-bclfastq-v-to-bclfastq-v-or-later.html</a></p><p>[6] <a href="http://bioinformatics.cvr.ac.uk/blog/how-to-demultiplex-illumina-data-and-generate-fastq-files-using-bcl2fastq/">http://bioinformatics.cvr.ac.uk/blog/how-to-demultiplex-illumina-data-and-generate-fastq-files-using-bcl2fastq/</a></p><p>[7] <a href="https://genomics-bcftbx.readthedocs.io/en/latest/protocols/prep_illumina.html">https://genomics-bcftbx.readthedocs.io/en/latest/protocols/prep_illumina.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e289852823d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>