直接看本文最下面下载脚本,区分SRR长度,下载fq
一、prefetch 下载
1. 打开NCBI数据库(https://www.ncbi.nlm.nih.gov/),在搜索框输入要查询的编号。
2.在搜索结果中勾选你感兴趣的样本,选择右上角Send to – File – Accession List, 点击Create File,下载SraAccList.txt 文件
3.下载安装最新版本SRA Toolkit。(https://www.ncbi.nlm.nih.gov/sra/docs/sradownload/#ui-ncbiinpagenav-heading-4 )
4.运行命令:**prefetch --option-file SraAccList.txt**
下载完成后,文件被存储在默认目录:**/home/usrname/ncbi/public/sra/**
cat SraAccList.txt
SraAccList.txt
### Step2:perfetch 数据下载和解压
# Step2.1 perfetch 下载
$ cat down.txt | while read id; do
echo $id;
( nohup prefetch $id --max-size 200G & );
done
# Step2.2 faster-dump解压
ls *.sra | while read id;
do
echo $id; ( nohup fasterq-dump -e 16 --split-files -O ./ $id & );
done
二、 Ascp 快速下载
软件下载:
wget http://download.asperasoft.com/download/sw/connect/3.7.4/aspera-connect-3.7.4.147727-linux-64.tar.gz
tar -zxvf aspera-connect-3.7.4.147727-linux-64.tar.gz
sh aspera-connect-3.7.4.147727-linux-64.sh
添加环境变量:
vi ~/.bashrc
export PATH="/home/username/.aspera/connect/bin:$PATH" # usernam