? 通過linux服務(wù)器終端下載轉(zhuǎn)錄組測序文件的方式有很多件舵,不同數(shù)據(jù)庫可能需要執(zhí)行不同的下載代碼,我在這簡單梳理一下脯厨。(因為剛接觸linux系統(tǒng)铅祸,肯定會存在紕漏,敬請指正:衔洹)
1.NCBI數(shù)據(jù)庫
我首先嘗試的是
wget https://sra-pub-run-odp.s3.amazonaws.com/sra/SRR11955376/SRR11955376
然而临梗,這種方式下載速度非常慢。上網(wǎng)查詢后發(fā)現(xiàn)很多人推薦使用sratoolkit來下載NCBI上的sra文件(下載鏈接:https://www.ncbi.nlm.nih.gov/home/tools/)
下載安裝sratoolkit后輸入:
prefetch SRP133642
可直接下載目標文件
注:很多帖子說可以用prefetch+aspera的方式高速下載sra文件稼跳,但我一直沒成功盟庞。可能是因為ncbi已經(jīng)不支持aspera下載sra文件的方式(參考鏈接:https://github.com/ncbi/sra-tools/issues/255)
#批量下載
從ncbi的sra數(shù)據(jù)庫上下載access_list.txt文件
然后執(zhí)行:
cat SRR_Acc_List.txt |while read id;do (prefetch $id -X 100G );done #可加nohup掛后臺下載
2.ENA數(shù)據(jù)庫
網(wǎng)上很多人推薦從ena下載sra數(shù)據(jù)汤善,不僅是因為ena仍然支持aspera高速下載什猖,而且可以直接下載fastq文件,不需要后續(xù)sra文件到fastq文件轉(zhuǎn)換红淡。
下載代碼:
ascp -QT -l 300m -P33001? \
-i ~/miniconda3/envs/cellranger/etc/asperaweb_id_dsa.openssh? \
era-fasp@fasp.sra.ebi.ac.uk:/vol1/fastq/SRR180/001/SRR1805931/SRR1805931_1.fastq.gz .
#批量下載
#進入ena數(shù)據(jù)庫下載TSV文件不狮,整理成如下形式
#fasp.sra.ebi.ac.uk:/vol1/fastq/SRR103/008/SRR1039508/SRR1039508_1.fastq.gz
? fasp.sra.ebi.ac.uk:/vol1/fastq/SRR103/009/SRR1039509/SRR1039509_1.fastq.gz
? fasp.sra.ebi.ac.uk:/vol1/fastq/SRR103/000/SRR1039510/SRR1039510_1.fastq.gz
? fasp.sra.ebi.ac.uk:/vol1/fastq/SRR103/008/SRR1039508/SRR1039508_2.fastq.gz
? ....
cat fq.txt |while read id
do
ascp -QT -l 300m -P33001? \
-i ~/miniconda3/envs/download/etc/asperaweb_id_dsa.openssh? \
era-fasp@$id? .
done
(ena數(shù)據(jù)庫默認的ascp id是era-fasp)
3.GSA數(shù)據(jù)庫
GSA數(shù)據(jù)庫是中科院北京基因組研究所生命與健康大數(shù)據(jù)中心開發(fā)的原始組學數(shù)據(jù)歸檔庫。與以上兩種數(shù)據(jù)庫類似在旱,主要用于存儲測序文件摇零。
下載方式:
#根據(jù)項目號查找項目
wget -c -r -np -k -L -p? ftp://download.big.ac.cn/gsa/[GSA_ID]/ #按項目號搜索后可以得到下載鏈接,替換即可
wget -i file1.txt
(file.txt:將數(shù)據(jù)下載鏈接匯總為一個txt文件)
#使用aspera下載(未成功桶蝎,代碼執(zhí)行后需要密碼驻仅,可能需要管理員權(quán)限?)
ascp -P33001 -i ~/miniconda3/envs/cellranger/etc/asperaweb_id_dsa.openssh -Q -T -l 200m -k1 -d aspera01@download.cncb.ac.cn:gsa2/CRA006042 ~/scrna/raw/PRJCA008174/