ffqとaria2を使ってfastqファイルを取得するためのユーティリティ。大規模なデータセットを迅速かつ効率的にダウンロードできるよう設計されている。GEO、SRA、EMBL-EBIのENA、DDBJのDRAなどのデータのダウンロードに対応している。
特徴(レポジトリより)
- 高速:aria2を使ってファイルを並列ダウンロードするため、ダウンロード速度が大幅に向上している。
- 完全性:md5sumでダウンロードしたファイルの整合性を検証し、ファイルが破損していないか検証する。
- 再試行:初回のダウンロードが失敗した場合、自動的に再ダウンロードを試みるため、データの確実な取得が可能。
公共データベースから高速かつ確実にfastqファイルをダウンロードする ngsfetch をリリースしました。自分用に使っていたスクリプトをパッケージにしてみたシリーズです。https://t.co/yvUwkdvic9
— くぼたなおと (@kubotter_123) April 1, 2025
インストール
pipでwindows11のWSLにインストールした。
依存
- python (>=3.9)
- ffq (>=0.3.1)
- aria2 (>=0.0.1b0)
#conda(link)
mamba create -n ngsfetch python=3.9 -y
conda activate ngsfetch
mamba install -c bioconda ngsfetch
#pip
pip install ngsfetch
#Docker(link)
docker pull naotokubota/ngsfetch
> ngsfetch -h
usage: ngsfetch [-h] [-i ID] [-o OUTPUT] [-p PROCESSES] [--attempts ATTEMPTS] [-v]
ngsfetch v0.1.1 - fast retrieval of metadata and fastq files with ffq and aria2c
optional arguments:
-h, --help show this help message and exit
-i ID, --id ID ID of the data to fetch
-o OUTPUT, --output OUTPUT
Output directory
-p PROCESSES, --processes PROCESSES
Number of processes to use (up to 16)
--attempts ATTEMPTS Number of attempts to fetch metadata and fastq files
-v, --verbose Increase verbosity
実行方法
GEOのGSE52856を取得する。
ngsfetch -i GSE52856 -o outdir -p 8
- -p PROCESSES Number of processes to use (up to 16)
- -o OUTPUT Output directory
SRAのSRP175008を取得する。
ngsfetch -i SRP175008 -o outdir -p 8
ENAのERP126666を取得する。
ngsfetch -i ERP126666 -o outdir -p 8
引用
https://github.com/NaotoKubota/ngsfetch
関連