Objectives
In this lab, you will explore a popular fast mapper called BWA. Simulated RNA-seq data will be provided to you; the data contains 75 bp paired-end reads that have been generated in silico to replicate real gene count data from Drosophila. The data simulates two biological groups with three biological replicates per group (6 samples total). The objectives of this lab is mainly to:
...
| Code Block | ||
|---|---|---|
| ||
cds cd my_rnaseq_course cd day_1_partB/bwa_exercise |
...
Lets look at the data files and reference files
| Code Block | ||
|---|---|---|
| ||
ls ../data
ls ../reference
#transcriptome
head ../reference/transcripts.fasta
#see how many transcripts there are in the file
grep -c '^>' ../reference/transcripts.fasta
#genome
head ../reference/genome.fa
#see how many sequences there are in the file
grep -c '^>' ../reference/genome.fa
#annotation
head ../reference/genes.formatted.gtf
#see how many entries there are in this file
wc -l ../reference/genes.formatted.gtf |
Load the module:Run BWA
| Code Block |
|---|
module load bwa |
...
| Code Block |
|---|
bwa index -a bwtsw reference/transcripts.fafasta |
Part 2. Align the samples to reference using bwa mem
...
| Warning | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
Create a
|
Since this will take a while to run, you can look at already generated results at: bwa_mem_results_transcriptome
Alternatively, we can also use bwa to make to the genome (reference/genome.fa). Those already generated results are at: bwa_mem_results_genome
Help! I have a lots of reads and a large number of reads. Make BWA go faster!
Use threading option in the bwa command ( bwa -t <number of threads>)
- Split one data file into smaller chunks and run multiple instances of bwa. Finally concatenate the output.
- WAIT! We have a pipeline for that!
- Look for runBWA.sh in $BI/bin (it should be in your path)
Now that we are done mapping, lets look at how to assess mapping results.