轉錄組入門(5):序列比對,轉錄入門
工作清單
- 比對軟體
- hisat2的用法
- 下載index檔案
- 比對、排序、索引
- 品質控制
- 載入IGV,幾個基因
hisat2的用法本作業是比對到基因組,所以使用gapped or splices mapper,此流程已經更新。TopHat首次被發表已經是7年前,STAR的比對速度是TopHat的50倍,HISAT更是STAR的1.2倍。HISAT2是TopHat2/Bowti2的繼任者,使用改進的BWT演算法,實現了更快的速度和更少的資源佔用,作者推薦TopHat2/Bowti2和HISAT的使用者轉換到HISAT2。官網:https://ccb.jhu.edu/software/hisat2/index.shtml(學習一個軟體最好的方法就是結合現有中文資料,加上閱讀官方說明書和HELP文檔,一般剛開始學習的時候先使用預設參數,不要亂調參數)下載index檔案
cd ~/referencemkdir -p index/hisat && cd index/hisatwget -c ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/hg19.tar.gzwget -c ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/mm10.tar.gztar zxvf hg19.tar.gztar xvzf mm10.tar.gz
-c:斷點續傳比對、排序、索引把fastq格式的reads比對上去得到sam檔案,接著用samtools把它轉為bam檔案,並且排序(注意N和P兩種排序區別)索引好(可以使用管道實現,省去中間SAM儲存的過程,直接輸出BAM檔案)編寫bash指令碼:map.sh
#! usr/bin/bashset -uset -eset -o pipefailhg19_ref=/mnt/hgfs/2017/reference/index/hisat/hg19/genomemm10_ref=/mnt/hgfs/2017/reference/index/hisat/mm10/genomedata_path=/mnt/hgfs/2017/rna_seq/dataNUM_THREADS=25ls --color=never Homo*1.fastq.gz | while read id;do(~/biosoft/hisat2-2.1.0/hisat2 -t -p $NUM_THREADS -x $hg19_ref -1 $data_path/${id%_*}_1.fastq.gz -2 $data_path/${id%_*}_2.fastq.gz 2 > ${id%_*}_map.log | samtools view -Sb - > ${id%_*}.bam);donels --color=never Mus*1.fastq.gz | while read id;do(~/biosoft/hisat2-2.1.0/hisat2 -t -p $NUM_THREADS -x $mm10_ref -1 $data_path/${id%_*}_1.fastq.gz -2 $data_path/${id%_*}_2.fastq.gz 2 > ${id%_*}_map.log | samtools view -Sb - > ${id%_*}.bam);donels --color=never *.bam | while read id;do(samtools sort --threads $NUM_THREADS $id -o ${id%.*}_sorted.bam);donels --color=never *_sorted.bam | while read id;do(samtools index $id);done運行指令碼:
bash map.sh
品質控制對bam檔案進行簡單QCReads比對後的品質控制(評估比對品質的指標)比對上的reads佔總reads的百分比;Reads比對到外顯子和參考鏈上的覆蓋度是否一致;比對到基因組序列,多重比對reads;相關質控軟體除了Picard,RSeQC,Qualimap還有一大堆