使用kraken2/离心机分类结果筛选感兴趣分类单元的读数
filter-classified-reads的Python项目详细描述
过滤分类读取
使用kraken2/离心分类结果筛选感兴趣分类单元的读数。
- 免费软件:apache软件许可证2.0
- 文档:https://filter-classified-reads.readthedocs.io。
功能
- 对分类为感兴趣类群的读取的过滤器:{a5}和Centrifuge(默认为病毒读数筛选(TasIDID=10239))
- 输出未分类的读取和来自感兴趣分类单元的读取或使用排除它们–排除未分类的
- screed用于快速过滤读取
使用量
按Kraken2和Centrifuge将结束读取与分类结果配对
filter_classified_reads -i /path/to/reads/R1.fq \ -I /path/to/reads/R2.fq \ -o /path/to/reads/R1.filtered.fq \ -O /path/to/reads/R2.filtered.fq \ -k /path/to/kraken2/results.tsv \ -K /path/to/kraken2/kreport.tsv \ -c /path/to/centrifuge/results.tsv \ -C /path/to/centrifuge/kreport.tsv \
使用测试/data/中的测试数据:
$ filter_classified_reads -i tests/data/SRR8207674_1.viral_unclassified.seqtk_seed42_n10000.fastq.gz \ -I tests/data/SRR8207674_2.viral_unclassified.seqtk_seed42_n10000.fastq.gz \ -o r1.fq \ -O r2.fq \ -k tests/data/SRR8207674-kraken2_results.tsv \ -K tests/data/SRR8207674-kraken2_report.tsv \ -c tests/data/SRR8207674-centrifuge_results.tsv \ -C tests/data/SRR8207674-centrifuge_kreport.tsv
您应该看到以下日志信息:
2019-04-16 13:40:34,114 INFO: Parsing centrifuge results into DataFrame [in target_classified_reads.py:49] 2019-04-16 13:40:34,168 INFO: Parsed n=12281 centrifuge result records into DataFrame from "tests/data/SRR8207674-centrifuge_results.tsv" [in target_classified_reads.py:57] 2019-04-16 13:40:34,172 INFO: Parsed n=298 centrifuge Kraken-style report records into DataFrame from "tests/data/SRR8207674-centrifuge_kreport.tsv" [in target_classified_reads.py:60] 2019-04-16 13:40:34,177 INFO: Found 7129 unclassified reads from Centrifuge results [in target_classified_reads.py:65] 2019-04-16 13:40:34,242 INFO: Found 231 unique viral Taxonomy IDs [in target_classified_reads.py:98] 2019-04-16 13:40:34,245 INFO: Found 2181 target reads from centrifuge results [in target_classified_reads.py:101] 2019-04-16 13:40:34,245 INFO: Parsing kraken2 results into DataFrame [in target_classified_reads.py:49] 2019-04-16 13:40:34,289 INFO: Parsed n=20000 kraken2 result records into DataFrame from "tests/data/SRR8207674-kraken2_results.tsv" [in target_classified_reads.py:57] 2019-04-16 13:40:34,293 INFO: Parsed n=139 kraken2 Kraken-style report records into DataFrame from "tests/data/SRR8207674-kraken2_report.tsv" [in target_classified_reads.py:60] 2019-04-16 13:40:34,295 INFO: Found 1737 unclassified reads from Centrifuge results [in target_classified_reads.py:65] 2019-04-16 13:40:34,325 INFO: Found 26 unique viral Taxonomy IDs [in target_classified_reads.py:98] 2019-04-16 13:40:34,331 INFO: Found 8345 target reads from kraken2 results [in target_classified_reads.py:101] 2019-04-16 13:40:34,332 INFO: Found N=1701 common unclassified reads by all classification methods. [in cli.py:110] 2019-04-16 13:40:34,333 INFO: Total viral reads=8357 [in util.py:37] 2019-04-16 13:40:34,333 INFO: Centrifuge found n=12 target reads not found with Kraken2 [in util.py:38] 2019-04-16 13:40:34,333 INFO: Kraken2 found n=6176 target reads not found with Centrifuge [in util.py:40] 2019-04-16 13:40:34,338 INFO: N=1701 reads unclassified by both Centrifuge and Kraken2. [in util.py:62] 2019-04-16 13:40:34,345 INFO: Writing n=9999 filtered reads from "tests/data/SRR8207674_1.viral_unclassified.seqtk_seed42_n10000.fastq.gz" to "r1.fq" [in cli.py:129] 2019-04-16 13:40:34,957 INFO: Writing n=9999 filtered reads from "tests/data/SRR8207674_2.viral_unclassified.seqtk_seed42_n10000.fastq.gz" to "r2.fq" [in cli.py:134] 2019-04-16 13:40:35,459 INFO: Done! [in cli.py:137]
学分
这个包是用Cookiecutter和audreyr/cookiecutter-pypackage项目模板创建的。
历史记录
0.1.0(2019-04-15)
- pypi上的第一个版本。