2 个版本
0.1.1 | 2024年7月22日 |
---|---|
0.1.0 | 2023年12月14日 |
#58 in 生物学
每月下载 158 次
45KB
857 行
NoHuman
👤➡️🚫 从测序运行中移除人类读取 👤➡️🚫
nohuman
通过使用 kraken2 对来自人类泛基因组参考联盟(HPRC)的 第一版人类泛基因组参考 中所有基因组构建的定制数据库进行分类,从测序读取中移除人类读取。它可以处理任何类型的测序技术。了解更多关于该方法的发展 这里。
安装
Conda(推荐)
$ conda install -c bioconda nohuman
预编译的二进制文件
注意:您需要使用此安装方法自行安装 kraken2。
curl -sSL nohuman.mbh.sh | sh
# or with wget
wget -nv -O - nohuman.mbh.sh | sh
您还可以像这样向脚本传递选项
$ curl -sSL nohuman.mbh.sh | sh -s -- --help
install.sh [option]
Fetch and install the latest version of nohuman, if nohuman is already
installed it will be updated to the latest version.
Options
-V, --verbose
Enable verbose output for the installer
-f, -y, --force, --yes
Skip the confirmation prompt during installation
-p, --platform
Override the platform identified by the installer [default: apple-darwin]
-b, --bin-dir
Override the bin installation directory [default: /usr/local/bin]
-a, --arch
Override the architecture identified by the installer [default: x86_64]
-B, --base-url
Override the base URL used for downloading releases [default: https://github.com/mbhall88/nohuman/releases]
-h, --help
Display this help message
Cargo
注意:您需要使用此安装方法自行安装 kraken2。
$ cargo install nohuman
容器
Docker 镜像托管在 quay.io。
singularity
先决条件: singularity
$ URI="docker://quay.io/mbhall88/nohuman"
$ singularity exec "$URI" nohuman --help
上面的命令将使用最新版本。如果您想指定版本,请使用 标签(或提交)如下。
$ VERSION="0.1.0"
$ URI="docker://quay.io/mbhall88/nohuman:${VERSION}"
docker
先决条件: docker
$ docker pull quay.io/mbhall88/nohuman
$ docker run quay.io/mbhall88/nohuman nohuman --help
您可以在 quay.io 仓库 中找到所有可用的标签。
从源码构建
注意:您需要使用此安装方法自行安装 kraken2。
$ git clone https://github.com/mbhall88/nohuman.git
$ cd nohuman
$ cargo build --release
$ target/release/nohuman -h
用法
下载数据库
$ nohuman -d
默认情况下,这将数据库放置在 $HOME/.nohuman/db
。如果您想将其下载到其他位置,请使用 --db
选项。
检查依赖项是否可用
$ nohuman -c
[2023-12-14T04:10:46Z INFO ] All dependencies are available
移除人类读取
$ nohuman -t 4 in.fq
这将向 kraken2 传递 4 个线程,并将干净的读取输出为 in.nohuman.fq
。
您可以使用-o
指定输出文件的存放位置。
$ nohuman -t 4 -o clean.fq in.fq
如果您有配对端Illumina测序数据
$ nohuman -t 4 in_1.fq in_2.fq
或者指定不同的输出路径
$ nohuman -t 4 --out1 clean_1.fq --out2 clean_2.fq in_1.fq in_2.fq
注意:输出文件始终为未压缩格式,即使提供了压缩的输入。
$ nohuman -h
Remove human reads from a sequencing run
Usage: nohuman [OPTIONS] [INPUT]...
Arguments:
[INPUT]... Input file(s) to remove human reads from
Options:
-o, --out1 <OUTPUT_1> First output file
-O, --out2 <OUTPUT_2> Second output file - if two input files given
-c, --check Check that all required dependencies are available
-d, --download Download the database
-D, --db <PATH> Path to the database [default: /home/mihall/.nohuman/db]
-t, --threads <INT> Number of threads to use in kraken2 [default: 1]
-v, --verbose Set the logging level to verbose
-h, --help Print help (see more with '--help')
-V, --version Print version
完整用法
$nohuman --help
Remove human reads from a sequencing run
Usage: nohuman [OPTIONS] [INPUT]...
Arguments:
[INPUT]...
Input file(s) to remove human reads from
Options:
-o, --out1 <OUTPUT_1>
First output file.
Defaults to the name of the first input file with the suffix "nohuman" appended. e.g. "input_1.fastq.gz" -> "input_1.nohuman.fq". NOTE: kraken2 output cannot be compressed, so the output will always be uncompressed.
-O, --out2 <OUTPUT_2>
Second output file - if two input files given.
Defaults to the name of the first input file with the suffix "nohuman" appended. e.g. "input_2.fastq.gz" -> "input_2.nohuman.fq". NOTE: kraken2 output cannot be compressed, so the output will always be uncompressed.
-c, --check
Check that all required dependencies are available
-d, --download
Download the database
-D, --db <PATH>
Path to the database
[default: /home/mihall/.nohuman/db]
-t, --threads <INT>
Number of threads to use in kraken2
[default: 1]
-v, --verbose
Set the logging level to verbose
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
替代方案
Hostile是一种基于比对的方法,表现良好。它比nohuman
kraken方法所需时间更长,内存使用更多,但针对Illumina数据的准确性略高。更多详情和替代方法请参见论文。
引用
Hall, Michael B. 和 Lachlan J. M. Coin. “Pangenome databases improve host removal and mycobacteria classification from clinical metagenomic data” GigaScience, 2024年4月4日. https://doi.org/10.1093/gigascience/giae010
@article{hall_pangenome_2024,
title = {Pangenome databases improve host removal and mycobacteria classification from clinical metagenomic data},
volume = {13},
issn = {2047-217X},
url = {https://doi.org/10.1093/gigascience/giae010},
doi = {10.1093/gigascience/giae010},
urldate = {2024-04-07},
journal = {GigaScience},
author = {Hall, Michael B and Coin, Lachlan J M},
month = jan,
year = {2024},
pages = {giae010},
}
依赖项
~14–27MB
~437K SLoC