下載參考基因組后進行完整性檢驗、建立索引

摘錄自:https://blog.51cto.com/xiangpang/1711603

? ? ? ? ? ? ? ?http://www.lxweimin.com/p/9b15fa1f1a6f

? ? ? ? ? ? ? ?http://www.lxweimin.com/p/75404f813e0a

md5sum命令用于生成和校驗文件的md5值。它會逐位對文件的內容進行校驗。是文件的內容,與文件名無關,也就是文件內容相同,其md5值相同。在網絡傳輸時,我們校驗源文件獲得其md5sum,傳輸完畢后,校驗其目標文件,并對比如果源文件和目標文件md5 一致的話,則表示文件傳輸無異常。否則說明文件在傳輸過程中未正確傳輸。以hg38為例進行操作。

一、下載?所需要的hg38.fa.gz 和質量控制文件md5sum.txt,進行完整性檢驗。

http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/

cat md5sum.txt

挑選?1c9dcaddfa41027f17cd8f7a82c7293b hg38.fa.gz?

echo 1c9dcaddfa41027f17cd8f7a82c7293b hg38.fa.gz > check_md5sum_hg38.md5

md5sum -c check_md5sum_hg38.md5? #測試時使用的是".md5"后綴,注意前后名稱要保持一致

hg38.fa.gz: OK #表示所下載的hg38文件及格

md5sum的選項:

-b 以二進制模式讀入文件內容

-t 以文本模式讀入文件內容

-c 根據(jù)已生成的md5值,對現(xiàn)存文件進行校驗

--status 校驗完成后,不生成錯誤或正確的提示信息,可以通過命令的返回值來判斷。

二、解壓文件hg38.fa.gz做準備

gunzip hg38.fa.gz? ?##謹記!

由于建立索引的時間過長,建議掛到服務器后臺運行

bowtie2-build hg38.fa hg38 #bowtie2 建立索引

nohup bowtie2-build hg38.fa hg38 & > nohup01.out


PS:?下載參考基因組及比對軟件的代碼:

下載的小鼠基因組

cd ~/reference

mkdir -p? genome/mm10? && cd genome/mm10

nohup wget http://hgdownload.cse.ucsc.edu/goldenPath/mm10/bigZips/chromFa.tar.gz? &

tar zvfx chromFa.tar.gz

cat *.fa > mm10.fa

rm chr*.fa

下載hg19:

cd ~/reference

mkdir -p genome/hg19? && cd genome/hg19

nohup wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/chromFa.tar.gz &

tar zvfx chromFa.tar.gz

cat *.fa > hg19.fa

rm chr*.fa

下載hg38

cd ~/reference

mkdir -p genome/hg38? && cd genome/hg38

nohup wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.fa.gz? &

bowtie軟件建立索引文件

cd ~/reference

mkdir -p index/bowtie && cd index/bowtie

nohup time ~/biosoft/bowtie/bowtie2-2.2.9/bowtie2-build? ~/reference/genome/hg19/hg19.fa? ~/reference/index/bowtie/hg19 1>hg19.bowtie_index.log 2>&1 &

nohup time ~/biosoft/bowtie/bowtie2-2.2.9/bowtie2-build? ~/reference/genome/hg38/hg38.fa? ~/reference/index/bowtie/hg38 1>hg38.bowtie_index.log 2>&1 &

nohup time ~/biosoft/bowtie/bowtie2-2.2.9/bowtie2-build? ~/reference/genome/mm10/mm10.fa? ~/reference/index/bowtie/mm10 1>mm10.bowtie_index.log 2>&1 &

bwa軟件建立索引文件

cd ~/reference

mkdir -p index/bwa && cd index/bwa

nohup time ~/biosoft/bwa/bwa-0.7.15/bwa index? -a bwtsw? -p ~/reference/index/bwa/hg19? ~/reference/genome/hg19/hg19.fa 1>hg19.bwa_index.log 2>&1? &

nohup time ~/biosoft/bwa/bwa-0.7.15/bwa index? -a bwtsw? -p ~/reference/index/bwa/hg38? ~/reference/genome/hg38/hg38.fa 1>hg38.bwa_index.log 2>&1? &

nohup time ~/biosoft/bwa/bwa-0.7.15/bwa index? -a bwtsw? -p ~/reference/index/bwa/mm10? ~/reference/genome/mm10/mm10.fa 1>mm10.bwa_index.log 2>&1? &

hisat軟件建立索引文件

cd ~/reference

mkdir -p index/hisat && cd index/hisat

nohup wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/hg19.tar.gz? &

nohup wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/hg38.tar.gz? &

nohup wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/grcm38.tar.gz &

tar zxvf hg19.tar.gz

tar zxvf grcm38.tar.gz

tar zxvf hg38.tar.gz

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容