Mapping

= Mapping = Using BWA, align short sequences to the human reference genome sequence database.

Align first batch echo "align first batch" $bwa aln -l 30 -t $CPUs \ $hg19_ref \ $fastq_path1/$fastq_for_gz \ > $PWDS/fastq1.sai \ 2> $PWDS/fastq1.log

Align second batch echo "align second batch" $bwa aln -l 30 -t $CPUs \ $hg19_ref \ $fastq_path1/$fastq_rev_gz \ > $PWDS/fastq2.sai \ 2> $PWDS/fastq2.log

Paired-end first batch echo "pe alignment " $bwa sampe \ $hg19_ref \ $PWDS/fastq1.sai \ $PWDS/fastq2.sai \ $fastq_path1/$fastq_for_gz \ $fastq_path1/$fastq_rev_gz \ | gzip > $PWDS/${subjectID}.sam.gz \ 2> PWDS/${subjectID}.pe.log

Sorting bam ${samtools} view -uS $PWDS/${subjectID}.sam.gz \ | ${samtools} sort -m 3000000000 - $PWDS/${subjectID}.srt

Indexing bam ${samtools} index ${PWDS}/${subjectID}.srt.bam

Generate stat ${bamtools} stats \ -insert \ -in $PWDS/${subjectID}.srt.bam \ > $PWDS/${subjectID}.srt.stats

< Back to Whole Exome Sequencing Analysis Pipeline