...
Part 1. Create a index of your reference
NO NEED TO RUN THIS NOW- YOUR INDEX HAS ALREADY BEEN BUILT!
Code Block |
---|
bwa index -a bwtsw reference/genome.fa
|
...
Part 2a. Align the samples to reference using bwa aln/samse/sampe
You will need to run We will be using this set of commands (with options that you should try to figure out) in this order, on each sample:
...
bwa aln
bwa samse or sampe
...
WhatLet's going on at each step?submit the bwa aln job
Warning |
---|
title | Submit to the TACC queue or run in an idev shell |
---|
|
Create a commands file and use launcher_creator.py followed by qsub. Expand |
---|
title | I need some help figuring out the options... |
---|
Put this in your commands file: bwa aln -f GSM794483_C1_R1_1.sai reference/genome.fa data/GSM794483_C1_R1_1.fq bwa aln -f GSM794483_C1_R1_2.sai reference/genome.fa data/GSM794483_C1_R1_2.fq bwa aln -f GSM794484_C1_R2_1.sai reference/genome.fa data/GSM794484_C1_R2_1.fq bwa aln -f GSM794484_C1_R2_2.sai reference/genome.fa data/GSM794484_C1_R2_2.fq bwa aln -f GSM794485_C1_R3_1.sai reference/genome.fa data/GSM794485_C1_R3_1.fq bwa aln -f GSM794485_C1_R3_2.sai reference/genome.fa data/GSM794485_C1_R3_2.fq bwa aln -f GSM794486_C2_R1_1.sai reference/genome.fa data/GSM794486_C2_R1_1.fq bwa aln -f GSM794486_C2_R1_2.sai reference/genome.fa data/GSM794486_C2_R1_2.fq bwa aln -f GSM794487_C2_R2_1.sai reference/genome.fa data/GSM794487_C2_R2_1.fq bwa aln -f GSM794487_C2_R2_2.sai reference/genome.fa data/GSM794487_C2_R2_2.fq |
|
...
bwa aln -f GSM794488_C2_R3_1.sai reference/genome.fa data/GSM794488_C2_R3_1.fq bwa aln -f GSM794488_C2_R3_2.sai reference/genome.fa data/GSM794488_C2_R3_2.fq |
|
What is a *.sai file? It's a file containing "alignment seeds" in a file format specific to BWA. Many programs produce this kind of "intermediate" file in their own format and then at the end have tools for converting things to a "community" format shared by many downstream programs.
...
Do we use sampe
or samse
?
Lets submit the bwa sampe job, but have it be on hold till previous job is finished.
Warning |
---|
title | Submit to the TACC queue or run in an idev shell |
---|
|
Create a commands file and use launcher_creator.py followed by qsub. Expand |
---|
title | I need some help figuring out the options... |
---|
| Put this in your commands file: bwa sampe -f C1_R1.sam reference/genome.fa GSM794483_C1_R1_1.sai GSM794483_C1_R1_2.sai data/GSM794483_C1_R1_1.fq data/GSM794483_C1_R1_2.fq bwa sampe -f C1_R2.sam reference/genome.fa GSM794484_C1_R2_1.sai GSM794484_C1_R2_2.sai data/GSM794484_C1_R2_1.fq data/GSM794484_C1_R2_2.fq fq bwa sampe -f C1_R3.sam reference/genome.fa GSM794485_C1_R3_1.sai GSM794485_C1_R3_2.sai data/GSM794485_C1_R3_1.fq data/GSM794485_C1_R3_2.fq bwa sampe -f C2_R1.sam reference/genome.fa GSM794486_C2_R1_1.sai GSM794486_C2_R1_2.sai data/GSM794486_C2_R1_1.fq data/GSM794486_C2_R1_2.fq bwa sampe -f C2_R2.sam reference/genome.fa GSM794487_C2_R2_1.sai GSM794487_C2_R2_2.sai data/GSM794487_C2_R2_1.fq data/GSM794487_C2_R2_2.fq bwa sampe -f C2_R3.sam reference/genome.fa GSM794488_C2_R3_1.sai GSM794488_C2_R3_2.sai data/GSM794488_C2_R3_1.fq data/GSM794488_C2_R3_2.fq |
|
Since this will take a while to run, you can look at already generated results at: /corral-repl/utexas/BioITeam/rnaseq_course/bwa_exercise/results/bwa
Part 2b. Align the samples to reference using bwa mem
Alternatively, lets also try running alignment using the newest and greatest, BWA MEM. Alignment is just one single step with bwa mem.
Warning |
---|
title | Submit to the TACC queue or run in an idev shell |
---|
|
Create a commands file and use launcher_creator.py followed by qsub. Expand |
---|
title | I need some help figuring out the options... |
---|
| Put this in your commands file: Code Block |
---|
bwa mem reference/genome.fa data/GSM794483_C1_R1_1.fq data/GSM794483_C1_R1_2.fq > C1_R1.mem.sam
bwa mem reference/genome.fa data/GSM794484_C1_R2_1.fq data/GSM794484_C1_R2_2.fq > C1_R2.mem.sam
bwa mem reference/genome.fa data/GSM794485_C1_R3_1.fq data/GSM794485_C1_R3_2.fq > C1_R3.mem.sam
bwa mem reference/genome.fa data/GSM794486_C2_R1_1.fq data/GSM794486_C2_R1_2.fq > C2_R1.mem.sam
bwa mem reference/genome.fa data/GSM794487_C2_R2_1.fq data/GSM794487_C2_R2_2.fq > C2_R2.mem.sam
bwa mem reference/genome.fa data/GSM794488_C2_R3_1.fq data/GSM794488_C2_R3_2.fq > C2_R3.mem.sam |
|
|
Help! I have a lots of reads and a large number of reads. Make BWA go faster!
Now that we are done mapping, lets look at how to assess mapping results.
...