This tutorial will help you get started with LSC by demonstrating how to error correct 500k sample PacBio long reads with 1 million short reads of length 75bp. If you experience any problems following these steps, please don't hesitate to contact us.
Step 1 - Download and extract the example files
Download the example:
Extract the example to an empty folder of your choice. After extracting the folder should contain the following files and folders:
dn800c9107:example moo$ ls data bin run.cfg
The tutorial will be given with the OSX version. However, the steps are the same for all versions.
Step 2 - Examine the example directory contentsBefore we continue, it will be helpful to learn the purpose of each file in this example. When you run LSC on your data, all of these files can be in separate locations if you wish.
- This is the most important file. It is a text file that contains the path to your sequencer reads and the configuration settings. Please see .cfg file format for details. It is simple to edit and you will need to edit it once for each data-set.
- data directory
- This directory contains all of the sequencer reads in the example. In your case, this directory could be anywhere and it may be read-only. In this example, you have a long read file: LR.fa abd a short reads file: SR.fa
- bin directory
- This is directory stores all of the LSC binaries. It is important that all the binaries are in the same location. No installation is required! Simply copy this directory to a location convenient for you.
- temp directory
- This is a temporary directory created during the execution of LSC. The results of the initial short reads mapping is stored here, so this directory can be quite large.
- output directory
- This is directory stores all the useful output after executing LSC. It is also created during the execution of LSC
Step 4 - Run LSC on the example data
Only one command is need to to initiate LSC.
Make sure your terminal is pointed to the example folder and type the following in one line:
You should then see some output:
0:00:03.350853 finsish genome 0:00:03.373916 finsish genome 0:00:03.380890 finsish genome 0:00:03.431138 finsish genome 0:00:13.153626 finsish genome finsish genome # novoindex (2.7) - Universal k-mer index constructor. # (C) 2008 NovoCraft # novoindex temp1/pseudochr_LR.fa.cps.nix temp1/pseudochr_LR.fa.cps # Creating 13 indexing threads. # Building with 11-mer and step of 1 bp. # novoindex construction dT = 0.8s # Index memory size 0.118Gbyte. # Done. #####write LR_SR_mapping to file:0:00:00.354859 finish loading files 0:00:00.100360 0:00:00.090582 0:00:00.079752 0:00:00.097951 ['LR_pathfilename ', ' /home/kinfai/example/data/LR.fa'] ['SR_pathfilename ', ' /home/kinfai/example/data/SR.fa'] ['I_nonredundant ', ' N'] ['Nthread1 ', ' 4'] ['Nthread2 ', ' 4'] ['temp_foldername ', ' temp'] ['output_foldername ', ' output'] ['Lpseudochr ', ' 50000000'] ['LgapInpseudochr ', ' 100'] ['I_RemoveBothTails ', ' Y'] ['MinNumberofNonN ', ' 39'] ['MaxN ', ' 1'] === sort and uniq SR data === 0:00:08.936349 ===split SR:=== 0:00:09.646970 ===compress SR.aa:=== 0:00:13.201526 ===RemoveBothTails in LR:=== 0:00:14.540232 ===compress LR:=== /home/kinfai/3seq/test_LSC_0.2.1/bin/FASTA2fa.py temp1/Notwotails_LR.fa temp1/LR.fa rm temp1/Notwotails_LR.fa 0:00:14.785848 ===compress LR:=== /home/kinfai/3seq/test_LSC_0.2.1/bin/compressFASTA.py -MinNonN=0 -MaxN=10000 temp1/LR.fa temp1/LR.fa. rm temp1/LR.fa ... ... ===cat full_LR_SR.map.fa :=== ===cat corrected_LR_SR.map.fa :=== ===cat uncorrected_LR_SR.map.fa :===
At this point, feel free to take a break. After about 3-4 minutes the the mapping and error correction will be completed.
Step 5 - Examining the outputAll of the output from LSC is automatically copied to the "output" directory. After this execution, it should contain:
dnab4167d9:output moo$ ls corrected_LR_SR.map.fa uncorrected_LR_SR.map.fa full_LR_SR.map.fa
The following is a description of each output file:
- As long as there are short reads (SR) mapped to a long read, this long read can be corrected at the SR-covered regions. (Please see more details from the paper). The sequence from the left-most SR-covered base to the right-most SR-covered base is outputted in the file corrected_LR_SR.map.fa
- Although the terminus sequences are corrected, they are concatenated with their corrected sequence (corrected_LR_SR.map.fa) to be a "full" sequence. Thus, this sequence covers the equivalent length as the raw read and is outputted in the file full_LR_SR.map.fa
- This is the negative control. uncorrected_LR_SR.map.fa contains the left-most SR-covered base to the right-most SR-covered base (equivalent region in corrected_LR_SR.map.fa) but not error corrected. Thus, it is fragments of the raw reads.