Chris:LabNotes/General Protocols/BaseCalling Procedure

From ZhangLabWiki
Jump to navigation Jump to search

Illumina Demultiplexing Procedure in Genome-Miner[edit]

  • Below is a procedure to take the raw basecall data from an Illumina run and output fastq files for all specified indices

Download Data from Basespace[edit]

Basecalling using bcl2fastq[edit]

  • Once we have the raw data, we next want to demultiplex the raw basecalls by using the following instructions. For example purposes, let's say we start inside the downloaded folder from Basespace on genome-miner at </home/cjwei/150512_MiSeq>

Edit SampleSheet.csv[edit]

  • Prior to running bcl2fastq, you must first make a few edits to the SampleSheet.csv file provided in the downloaded folder (this is in case there are both dual-indexed and single-indexed libraries in the same run). Let's say that the original SampleSheet.csv file is as follows with BS libraries being dual-indexed and CW libraries being single-indexed:
[Header],,,,,,,,,
IEMFileVersion,4,,,,,,,,
Investigator Name,Chris and Brandon,,,,,,,,
Experiment Name,2015 05 12 Miseq,,,,,,,,
Date,5/12/2015,,,,,,,,
Workflow,GenerateFASTQ,,,,,,,,
Application,FASTQ Only,,,,,,,,
Assay,Nextera XT v2 Set A,,,,,,,,
Description,2015 05 12 miseq,,,,,,,,
Chemistry,Amplicon,,,,,,,,
,,,,,,,,,
[Reads],,,,,,,,,
151,,,,,,,,,
,,,,,,,,,
[Settings],,,,,,,,,
ReverseComplement,0,,,,,,,,
,,,,,,,,,
[Data],,,,,,,,,
Sample_ID,Sample_Name,Sample_Plate,Sample_Well,I7_Index_ID,index,I5_Index_ID,index2,Sample_Project,Description
BS-4.23.15_BA8_nuclei_S502/N701,,,,N701,TAAGGCGA,S502,CTCTCTAT,,
BS-4.23.15_BA8_nuclei_S502/N702,,,,N702,CGTACTAG,S502,CTCTCTAT,,
BS-4.23.15_BA8_nuclei_S502/N703,,,,N703,AGGCAGAA,S502,CTCTCTAT,,
BS-4.23.15_BA8_nuclei_S502/N704,,,,N704,TCCTGAGC,S502,CTCTCTAT,,
BS-4.23.15_BA8_nuclei_S502/N705,,,,N705,GGACTCCT,S502,CTCTCTAT,,
CW-PPCap-HP-Apr21-12,,,,CW1,CTTGTANN,CW1.1,NNNNNNNN,,
CW-PPCap_2A_H-May7-21,,,,CW2,CAACCCNN,CW1.2,NNNNNNNN,,
CW-PPCap_2B_P-May7-28,,,,CW3,AGGTGCNN,CW1.3,NNNNNNNN,,
CW-PPCap_2C_HP-May7-2,,,,CW4,CGATGTNN,CW1.4,NNNNNNNN,,
CW-PPCap_2C-Mar13-36,,,,CW5,CAAGCANN,CW1.5,NNNNNNNN,,
CW-PPCap_2D-Mar13-43,,,,CW6,AGTGCCNN,CW1.6,NNNNNNNN,,
  • If we were interested in the dual-indexed BS libraries, we would simply remove the CW lines and proceed on to the next step.
  • However, say we are interested in the CW single indexed reads with barcodes found in index1 and only being 6 bases long. In order to demultiplex these CW libraries, we must consequently make the following changes to the SampleSheet.csv file (with all other lines above being constant):
[Data],,,,,,,,,
Sample_ID,Sample_Name,Sample_Plate,Sample_Well,I7_Index_ID,index,I5_Index_ID,index2,Sample_Project,Description
CW-PPCap-HP-Apr21-12,,,,CW1,CTTGTA,CW1.1,,,
CW-PPCap_2A_H-May7-21,,,,CW2,CAACCC,CW1.2,,,
CW-PPCap_2B_P-May7-28,,,,CW3,AGGTGC,CW1.3,,,
CW-PPCap_2C_HP-May7-2,,,,CW4,CGATGT,CW1.4,,,
CW-PPCap_2C-Mar13-36,,,,CW5,CAAGCA,CW1.5,,,
CW-PPCap_2D-Mar13-43,,,,CW6,AGTGCC,CW1.6,,,
  • Once the SampleSheet.csv has been updated accordingly, you can then move forward with actually running the bcl2fastq program. Note: Make sure that the RunInfo.xml file is in the current running directory, as bcl2fastq will produce an error if it is not. Since we are running within the original downloaded folder from basespace, this is not an issue.

Run bcl2fastq[edit]

  • A description of all the parameters you can use for bcl2fastq can be found in the manual: File:Cw 20150515 bcl2fastq conversion manual.pdf
  • If we wanted to run demultiplexing on the BS dual-indexed libraries, we would use the following command to output the gzipped fastq files:
bcl2fastq --sample-sheet SampleSheet.csv -o ../ -i Data/Intensities/BaseCalls --use-bases-mask y151,I8,I8 --barcode-mismatches=0
  • If we wanted to run demultiplexing on the CW single-indexed libraries, we would use the following command instead:
bcl2fastq --sample-sheet SampleSheet.csv -o FASTQ -i Data/Intensities/BaseCalls --use-bases-mask y151,I6N2,N8 --barcode-mismatches=0
  • Note there are a few parameters to keep an eye on in the bcl2fastq command:
    • --use-bases-mask specifies how to use each read/cycle:
      • An "n" means ignore the cycle
      • An "Y" (or "y") means use the cycle to generate FASTQ. In the above example, since we are only using single end reads at 150bp long, we specify y151 first
      • An "I" means use the cycle for index read.
      • A number means that the previous character is repeated that many times. Consequently, when we do I6N2 in the CW libraries example for index 1, we mean that the first 6 bases of index 1 are important while the last 2 are not
    • --barcode-mismatches=0
      • This requires that there be no mismatches in teh barcode in order to call that read. This si necessary because some read barcodes (ex: CAACCC and CAAGCA) are very similar to one another and we do not want these reads to demultiplex ambiguously
  • Once you run the command, you will see the appropriate fastq.gz files in teh output directory (in this case the parent directory ../)
  • NOTE: If paired end with one indexing read, then the correct --use-bases-mask is: --use-bases-mask y151,I6,y151


Illumina Demultiplexing Procedure in TSCC[edit]

Install bcl2fastq in TSCC[edit]