1、下载进NCBI官网
2、
3、
4、根据系统选择版本,下载即可
5、查看自己系统
[root@PC3 software]# hostnamectl Static hostname: PC3 Icon name: computer Chassis: n/a Machine ID: b7fae4ce730a4eb598ae4e92f7ad3683 Boot ID: 8cedfc6564604ef088354f6fb76a1f50 Virtualization: vmware Operating System: Red Hat Enterprise Linux Server 7.0 (Maipo) CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server Kernel: Linux 3.10.0-123.el7.x86_64 Architecture: x86_64
6、centos和redhed 使用软件一致
因此选择:
7、
[root@PC3 test]# wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/2.11.0/sratoolkit.2.11.0-centos_linux64.tar.gz
8、进度
9、
[root@PC3 test]# ls sratoolkit.2.11.0-centos_linux64.tar.gz
10、解压
[root@PC3 test]# tar -xzvf sratoolkit.2.11.0-centos_linux64.tar.gz
11、
[root@PC3 test]# ls sratoolkit.2.11.0-centos_linux64 sratoolkit.2.11.0-centos_linux64.tar.gz
12、
[root@PC3 test]# cd sratoolkit.2.11.0-centos_linux64/ [root@PC3 sratoolkit.2.11.0-centos_linux64]# ls bin CHANGES example README-blastn README.md README-vdb-config schema [root@PC3 sratoolkit.2.11.0-centos_linux64]# cd bin/ [root@PC3 bin]# ls abi-dump fasterq-dump-orig.2.11.0 pacbio-load srapath-orig.2.11.0 test-sra.2.11.0 abi-dump.2 fastq-dump pacbio-load.2 sra-pileup vdb-config abi-dump.2.11.0 fastq-dump.2 pacbio-load.2.11.0 sra-pileup.2 vdb-config.2 abi-load fastq-dump.2.11.0 prefetch sra-pileup.2.11.0 vdb-config.2.11.0 abi-load.2 fastq-dump-orig.2.11.0 prefetch.2 sra-pileup-orig.2.11.0 vdb-copy abi-load.2.11.0 fastq-load prefetch.2.11.0 sra-search vdb-copy.2 align-info fastq-load.2 prefetch-orig.2.11.0 sra-search.2 vdb-copy.2.11.0 align-info.2 fastq-load.2.11.0 rcexplain sra-search.2.11.0 vdb-decrypt align-info.2.11.0 helicos-load rcexplain.2 sra-sort vdb-decrypt.2 bam-load helicos-load.2 rcexplain.2.11.0 sra-sort.2 vdb-decrypt.2.11.0 bam-load.2 helicos-load.2.11.0 remote-fuser sra-sort.2.11.0 vdb-dump bam-load.2.11.0 illumina-dump remote-fuser.2 sra-sort-cg vdb-dump.2 blastn_vdb illumina-dump.2 remote-fuser.2.11.0 sra-sort-cg.2 vdb-dump.2.11.0 blastn_vdb.2 illumina-dump.2.11.0 sam-dump sra-sort-cg.2.11.0 vdb-dump-orig.2.11.0 blastn_vdb.2.10.1-2.11.0 illumina-load sam-dump.2 sra-stat vdb-encrypt cache-mgr illumina-load.2 sam-dump.2.11.0 sra-stat.2 vdb-encrypt.2 cache-mgr.2 illumina-load.2.11.0 sam-dump-orig.2.11.0 sra-stat.2.11.0 vdb-encrypt.2.11.0 cache-mgr.2.11.0 kar sff-dump sra-tblastn vdb-lock cg-load kar.2 sff-dump.2 sratools.2.11.0 vdb-lock.2 cg-load.2 kar.2.11.0 sff-dump.2.11.0 srf-load vdb-lock.2.11.0 cg-load.2.11.0 kdbmeta sff-load srf-load.2 vdb-unlock dump-ref-fasta kdbmeta.2 sff-load.2 srf-load.2.11.0 vdb-unlock.2 dump-ref-fasta.2 kdbmeta.2.11.0 sff-load.2.11.0 tblastn_vdb vdb-unlock.2.11.0 dump-ref-fasta.2.11.0 latf-load sra-blastn tblastn_vdb.2 vdb-validate fasterq-dump latf-load.2 srapath tblastn_vdb.2.10.1-2.11.0 vdb-validate.2 fasterq-dump.2 latf-load.2.11.0 srapath.2 test-sra vdb-validate.2.11.0 fasterq-dump.2.11.0 ncbi srapath.2.11.0 test-sra.2
13、
[root@PC3 bin]# ./fastq-dump This sra toolkit installation has not been configured. Before continuing, please run: vdb-config --interactive For more information, see https://www.ncbi.nlm.nih.gov/sra/docs/sra-cloud/
14、
[root@PC3 bin]# ls abi-dump fasterq-dump-orig.2.11.0 pacbio-load srapath-orig.2.11.0 test-sra.2.11.0 abi-dump.2 fastq-dump pacbio-load.2 sra-pileup vdb-config abi-dump.2.11.0 fastq-dump.2 pacbio-load.2.11.0 sra-pileup.2 vdb-config.2 abi-load fastq-dump.2.11.0 prefetch sra-pileup.2.11.0 vdb-config.2.11.0 abi-load.2 fastq-dump-orig.2.11.0 prefetch.2 sra-pileup-orig.2.11.0 vdb-copy abi-load.2.11.0 fastq-load prefetch.2.11.0 sra-search vdb-copy.2 align-info fastq-load.2 prefetch-orig.2.11.0 sra-search.2 vdb-copy.2.11.0 align-info.2 fastq-load.2.11.0 rcexplain sra-search.2.11.0 vdb-decrypt align-info.2.11.0 helicos-load rcexplain.2 sra-sort vdb-decrypt.2 bam-load helicos-load.2 rcexplain.2.11.0 sra-sort.2 vdb-decrypt.2.11.0 bam-load.2 helicos-load.2.11.0 remote-fuser sra-sort.2.11.0 vdb-dump bam-load.2.11.0 illumina-dump remote-fuser.2 sra-sort-cg vdb-dump.2 blastn_vdb illumina-dump.2 remote-fuser.2.11.0 sra-sort-cg.2 vdb-dump.2.11.0 blastn_vdb.2 illumina-dump.2.11.0 sam-dump sra-sort-cg.2.11.0 vdb-dump-orig.2.11.0 blastn_vdb.2.10.1-2.11.0 illumina-load sam-dump.2 sra-stat vdb-encrypt cache-mgr illumina-load.2 sam-dump.2.11.0 sra-stat.2 vdb-encrypt.2 cache-mgr.2 illumina-load.2.11.0 sam-dump-orig.2.11.0 sra-stat.2.11.0 vdb-encrypt.2.11.0 cache-mgr.2.11.0 kar sff-dump sra-tblastn vdb-lock cg-load kar.2 sff-dump.2 sratools.2.11.0 vdb-lock.2 cg-load.2 kar.2.11.0 sff-dump.2.11.0 srf-load vdb-lock.2.11.0 cg-load.2.11.0 kdbmeta sff-load srf-load.2 vdb-unlock dump-ref-fasta kdbmeta.2 sff-load.2 srf-load.2.11.0 vdb-unlock.2 dump-ref-fasta.2 kdbmeta.2.11.0 sff-load.2.11.0 tblastn_vdb vdb-unlock.2.11.0 dump-ref-fasta.2.11.0 latf-load sra-blastn tblastn_vdb.2 vdb-validate fasterq-dump latf-load.2 srapath tblastn_vdb.2.10.1-2.11.0 vdb-validate.2 fasterq-dump.2 latf-load.2.11.0 srapath.2 test-sra vdb-validate.2.11.0 fasterq-dump.2.11.0 ncbi srapath.2.11.0 test-sra.2
15、
[root@PC3 bin]# ./vdb-config --interactive
16、直接输入f选择(默认)
17、输入y选择yes
18、输入o
19、输入x 离开
20、输入y保存修改
21、输入o即可
22、测试软件
[root@PC3 bin]# ./fastq-dump Usage: /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 [options] <path> [<path>...] /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 [options] <accession> Use option --help for more information /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 : 2.11.0
23、添加环境变量
[root@PC3 bin]# pwd /home/software/sratoolkit.2.11.0-centos_linux64/bin
24、 路径是上一条命令pwd输出的路径, 后面是追加>>, 千万不要写成重定向>.
[root@PC3 bin]# echo "export PATH=$PATH:/home/software/sratoolkit.2.11.0-centos_linux64/bin" >> ~/.bashrc
25、加载
[root@PC3 bin]# source ~/.bashrc
26、测试
[root@PC3 bin]# fastq-dump Usage: /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 [options] <path> [<path>...] /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 [options] <accession> Use option --help for more information /home/software/sratoolkit.2.11.0-centos_linux64/bin/fastq-dump.2.11.0 : 2.11.0
27、使用数据测试,下载好的两个样本的测试数据
[root@PC3 test]# ls SRR1135309.1 SRR1138358.1
28、单样本测试,没有问题
[root@PC3 test]# fastq-dump --gzip --split-3 SRR1135309.1 -O test
29、写成循环
[root@PC3 test]# ls SRR1135309.1 SRR1138358.1
[root@PC3 test]# ls SRR* | while read id; do fastq-dump --gzip --split-3 $id -O result$id; done
30、无中断运行
[root@PC3 test]# nohup ls SRR* | while read id; do fastq-dump --gzip --split-3 $id -O result$id; done >log 2>&1 & [1] 5781 [root@PC3 test]# nohup: ignoring input and redirecting stderr to stdout