Prepare for Day 2
To prepare for Day 2, try to start either BWA or Bowtie2 mapping of these two fastq files:
$BI/ngs_course/human_variation/allseqs_R1.fastq
$BI/ngs_course/human_variation/allseqs_R2.fastq
against this reference:
$BI/ngs_course/human_variation/ref/hs37d5.fa
followed by converting the output to bam format, sorting the bam file, and indexing the output.
Hint
For either BWA or Bowtie, you need an indexed reference generated by either bwa index
or bowtie-build
. Perhaps one already exists? You then call the alignment program(s) bwa aln/bwa sampe
or bowtie
. Conversion, sorting, and indexing of the output are all done via samtools
.
Solution
- Mapping
- For BWA, the commands are:
module load bwa; bwa aln $BI/ngs_course/human_variation/ref/hs37d5.fa $BI/ngs_course/human_variation/allseqs_R1.fastq > r1.sai && bwa aln $BI/ngs_course/human_variation/ref/hs37d5.fa $BI/ngs_course/human_variation/allseqs_R2.fastq > r2.sai && bwa sampe $BI/ngs_course/human_variation/ref/hs37d5.fa r1.sai r2.sai $BI/ngs_course/human_variation/allseqs_R1.fastq $BI/ngs_course/human_variation/allseqs_R1.fastq > test.sam
- For bowtie2:
module load bowtie/2.0.0b6; bowtie2 -t -x $BI/ngs_course/human_variation/ref/hs37d5_bowtie2 -1 $BI/ngs_course/human_variation/allseqs_R1.fastq -2 $BI/ngs_course/human_variation/allseqs_R2.fastq -S test.sam
- Convert, sort, and index output:
samtools view -S -b test.sam > test.bam && samtools sort test.bam test.sorted && samtools index test.sorted.bam
For a bit of extra challenge, you could make two separate commands
files, one for each mapper, qsub them. Watch out - you'll need to make sure they both write output to different files, or run in different directories!
Welcome to the University Wiki Service! Please use your IID (yourEID@eid.utexas.edu) when prompted for your email address during login or click here to enter your EID. If you are experiencing any issues loading content on pages, please try these steps to clear your browser cache.