李拖沓
2022/11/17阅读:41主题:嫩青
记录一下安装和配置sratoolkit
下载地址
01. Downloading SRA Toolkit · ncbi/sra-tools Wiki (github.com)
我下载的Ubuntu版本

解压
“(9条消息) Ubuntu 常用解压与压缩命令_蕉叉熵的博客-CSDN博客_ubuntu解压缩命令
Ubuntu 常用解压与压缩命令 .tar 文件
仅打包,并非压缩
tar -xvf FileName.tar # 解包 tar -cvf FileName.tar DirName # 将DirName和其下所有文件(夹)打包 1 2 3 .gz文件
.gz
gunzip FileName.gz # 解压1 gzip -d FileName.gz # 解压2 gzip FileName # 压缩,只能压缩文件 1 2 3 4 .tar.gz文件、 .tgz文件
.tar.gz 和 .tgz
tar -zxvf FileName.tar.gz # 解压 tar -zcvf FileName.tar.gz DirName # 将DirName和其下所有文件(夹)压缩 tar -C DesDirName -zxvf FileName.tar.gz # 解压到目标路径 1 2 3 4 .zip文件
感觉.zip占用空间比.tar.gz大
unzip FileName.zip # 解压 zip FileName.zip DirName # 将DirName本身压缩 zip -r FileName.zip DirName # 压缩,递归处理,将指定目录下的所有文件和子目录一并压缩 1 2 3 4 .rar文件
mac和linux并没有自带rar,需要去下载
rar x FileName.rar # 解压 rar a FileName.rar DirName # 压缩 ———————————————— 版权声明:本文为CSDN博主「蕉叉熵」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/songbinxu/article/details/80435665
按照上述操作使用代码
tar -zxvf sratoolkit.3.0.1-ubuntu64.tar.gz
添加到环境变量
解压后会得到一个文件夹,把这个文件夹里的bin添加到PAHT中
PATH="${PATH}:/home/siang/sratoolkit.3.0.1-ubuntu64/bin"
添加环境变量的时候要小心操作,如果把PATH弄乱了就不好了。但是也有修复的方式
“(9条消息) linux下环境变量PATH设置错误的补救_铭霏的博客-CSDN博客
使用"echo $PATH"命令就可以查看当前服务器的PATH变量值,在正常的服务器上运行命令并复制输出的结果,然后用"export PATH"命令重新给PATH命令赋值就可以了。命令如下: "export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" ———————————————— 版权声明:本文为CSDN博主「铭霏」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/u012102306/article/details/51036561
# 输入
$ prefetch -h
# 弹出来下面一堆帮助文档说明成功安装了
Usage:
prefetch [options] <SRA accession> [...]
Download SRA files and their dependencies
prefetch [options] --cart <kart file>
Download cart file
prefetch [options] <URL> --output-file <FILE>
Download URL to FILE
prefetch [options] <URL> [...] --output-directory <DIRECTORY>
Download URL or URL-s to DIRECTORY
prefetch [options] <SRA file> [...]
Check SRA file for missed dependencies and download them
Options:
-T|--type <value> Specify file type to download. Default: sra
-t|--transport <http|fasp|both> Transport: one of: fasp; http; both
[default]. (fasp only; http only; first try
fasp (ascp), use http if cannot download
using fasp).
--location <value> Location of data.
-N|--min-size <size> Minimum file size to download in KB
(inclusive).
-X|--max-size <size> Maximum file size to download in KB
(exclusive). Default: 20G
-f|--force <yes|no|all|ALL> Force object download: one of: no, yes,
all, ALL. no [default]: skip download if the
object if found and complete; yes: download
it even if it is found and is complete; all:
ignore lock files (stale locks or it is
being downloaded by another process use
at your own risk!); ALL: ignore lock files,
restart download from beginning.
-r|--resume <yes|no> Resume partial downloads: one of: no, yes
[default].
-C|--verify <yes|no> Verify after download: one of: no, yes
[default].
-p|--progress Show progress.
-H|--heartbeat <value> Time period in minutes to display download
progress. (0: no progress), default: 1
--eliminate-quals Don't download QUALITY column.
-c|--check-all Double-check all refseqs.
-S|--check-rs <yes|no|smart> Check for refseqs in downloaded files: one
of: no, yes, smart [default]. Smart: skip
check for large encrypted non-sra files.
-o|--order <kart|size> Kart prefetch order when downloading
kart: one of: kart, size. (in kart order, by
file size: smallest first), default: size.
-R|--rows <rows> Kart rows to download (default all). Row
list should be ordered.
--perm <PATH> PATH to jwt cart file.
--ngc <PATH> PATH to ngc file.
--cart <PATH> To read kart file.
-a|--ascp-path <ascp-binary|private-key-file> Path to ascp program and
private key file (asperaweb_id_dsa.putty)
--ascp-options <value> Arbitrary options to pass to ascp command
line.
-o|--output-file <FILE> Write file to FILE when downloading
single file.
-O|--output-directory <DIRECTORY> Save files to DIRECTORY/
-h|--help Output brief explanation for the program.
-V|--version Display the version of the program then
quit.
-L|--log-level <level> Logging level as number or enum string. One
of (fatal|sys|int|err|warn|info|debug) or
(0-6) Current/default is warn
-v|--verbose Increase the verbosity of the program
status messages. Use multiple times for more
verbosity. Negates quiet.
-q|--quiet Turn off all status messages for the
program. Negated by verbose.
--option-file <file> Read more options and parameters from the
file.
prefetch : 3.0.1
使用
参考
SRA Toolkit的使用和安装 - 简书 (jianshu.com)
我这里只是把下好的文件拆分一下。
作者介绍