EukCC2评估真核生物MGAs质量

2023-11-09 21:36

本文主要是介绍EukCC2评估真核生物MGAs质量,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • 简介和原理
  • Install
  • 配置数据库
  • 使用
    • 单个bin
    • 包含bins的目录
    • Bin merging
    • 示例数据集
    • 自测数据
    • 更多参数
  • 参考

简介和原理

EukCC2是一个基于python编写的用于评估真核生物MAGs完整度和污染度的软件。可以评估binning后的单个bin或者bins目录。
其原理是基于动态变化的单拷贝标记基因集(SCMGs),包括基础真核生物、真菌、原生动物及植物的SCMGs。
SCMGs的原理在于基于特异物种谱系通用的单个拷贝的基因,所以可以比较预测的基因数量来评估完整性,而额外的SCMGs则是污染序列。

Install

  • conda一步安装到位
(base) [yut@node02]$ mamba create -n eukcc -c conda-forge -c bioconda "eukcc>=2"
$ conda activate eukcc
(eukcc) [yut@node02]$ eukcc --version
EukCC version 2.1.0
# pip install eukcc

参考https://eukcc.readthedocs.io/en/latest/quickstart.html

配置数据库

一次性为EukCC配置数据库(注意事项,版本 1 的数据库不兼容。因此,在升级到 EukCC2 后,请务必升级数据库)。
获取数据库非常简单:

  • 数据库6.01G,wget下载可能比较慢,可以在本地使用freedownloadmanager(https://www.freedownloadmanager.org/zh/)快速下载,然后上传到服务器。
mkdir eukccdb
cd eukccdb
wget http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/eukcc2_db_ver_1.2.tar.gz
tar -xzvf eukcc2_db_ver_1.1.tar.gz
# 在.bashrc配置全局变量
export EUKCC2_DB=/path/to/.../eukcc2_db_ver_1.1

参考http://ftp.ebi.ac.uk/pub/databases/metagenomics/eukcc/

使用

EukCC有两种模式。可以在一个单独的bin上或在一个bins的文件夹上运行EukCC。

在单个bin上运行EukCC给了最多的选择,可以根据你的需要调整参数。对于大多数元基因组工作流程来说,在一个bin的文件夹上运行EukCC可能是最简单的事情。

单个bin

假设已将 $EUKCC2_DB 设置到正确位置。如果没有,请使用 --db 标志将数据库传递给 EukCC。

eukcc single --out outfolder --threads 8 bin.fa

EukCC将在8个线程上运行。你可以将核苷酸fastas或蛋白质组传递到EukCC。它会自动检测是否需要预测蛋白质。
默认情况下,它不会使用多于一个线程来将基因组放置在参考树中,以节省内存。

  • 实际测试:酵母菌参考基因组(Yeast_GCF_000149845.2_SJ5_genomic.fna)耗时2min,污染度0,完整度100
(eukcc) [yutao@myosin eukcc]$ time eukcc single --out yeast_out -t 50 Yeast_GCF_000149845.2_SJ5_genomic.fna
23-09-2022 16:08:01:  EukCC version 2.1.023-09-2022 16:08:01:  Set sequence type to DNA
23-09-2022 16:08:22:  Doing a first pass placement in the base database
23-09-2022 16:08:22:  Searching for marker genes in base database
23-09-2022 16:08:23:  Found 21 marker genes, placing them in the tree 
23-09-2022 16:09:11:  Genome belongs to clade: fungi (Best TaxID: 4894)
23-09-2022 16:09:11:  Searching for marker genes in fungi database
23-09-2022 16:09:12:  Found 11 marker genes, placing them in the tree using epa-ng
23-09-2022 16:09:27:  Automatically locating best SCMG set
23-09-2022 16:09:57:  Searching fasta for selected markers
23-09-2022 16:10:44:  Completeness: 100.0
23-09-2022 16:10:44:  Contamination: 0.0
23-09-2022 16:10:44:  Max silent contamination: 4.59
23-09-2022 16:10:44:  Wrote output to: /home/test/eukcc/yeast_out/eukcc.csvreal    2m44.545s
user    13m59.558s
sys     0m58.519s
  • 输出结果
$ cat 
(eukcc) [yutao@myosin yeast_out]$ cat eukcc.csv
fasta   completeness    contamination
/home/test/eukcc/Yeast_GCF_000149845.2_SJ5_genomic.fna    100.0   0.0

包含bins的目录

EukCC假定文件夹包含后缀为.fa的文件。如果不是这样,请使用–suffix参数。在目录模式下,EukCC也会尝试自动优化bins。

eukcc folder --out outfolder --threads 8 bins
# --suffix SUFFIX       Suffix (default: .fa)
  • 实际测试:第一个100完整度,0污染
(eukcc) [yut@myosin eukcc]$ time eukcc folder --out yeast_bins1 -t 50 yeast_bins1
23-09-2022 16:33:58:  EukCC version 2.1.0
23-09-2022 16:33:58:  Found 2 bins
23-09-2022 16:34:19:  Searching for marker genes in base database
23-09-2022 16:34:21:  Found 15 marker genes, placing them in the tree using epa-ng
23-09-2022 16:34:43:  Genome belongs to clade: fungi (Best TaxID: 4894)
23-09-2022 16:34:43:  Searching for marker genes in fungi database
23-09-2022 16:34:44:  Found 10 marker genes, placing them in the tree using epa-ng
23-09-2022 16:34:57:  Automatically locating best SCMG set
23-09-2022 16:35:16:  Searching fasta for selected markers
23-09-2022 16:36:00:  Completeness: 71.0
23-09-2022 16:36:00:  Contamination: 0.0
23-09-2022 16:36:00:  Max silent contamination: 100.0
23-09-2022 16:36:00:  Searching for marker genes in base database
23-09-2022 16:36:02:  Found 6 marker genes, placing them in the tree using epa-ng
23-09-2022 16:36:17:  Genome belongs to clade: fungi (Best TaxID: 4894)
23-09-2022 16:36:17:  Searching for marker genes in fungi database
23-09-2022 16:36:18:  Found 1 marker genes, placing them in the tree using epa-ng
23-09-2022 16:36:20:  Automatically locating best SCMG set
23-09-2022 16:36:38:  Searching fasta for selected markers
23-09-2022 16:37:10:  Completeness: 29.0
23-09-2022 16:37:10:  Contamination: 0.0
23-09-2022 16:37:10:  Max silent contamination: 100.0
23-09-2022 16:37:10:  Found 1 large bins to merge with
23-09-2022 16:37:10:  For bin 1.bin.fa we found 1 merging combinations
23-09-2022 16:37:10:  Created 0 merged binsreal    3m13.709s
bins(yeast)eukcc comp(%)eukcc cont(%)merge
7.8 + 3.5M71 + 290no
12M+64k100+00no

综上,单纯的folder并没有将拆分的2部分酵母合并在一起

Bin merging

如果EukCC在文件夹模式下运行,它可以尝试再合并两个更多的bins,以创建一个增加完整性的精炼/合并版本。

为此,你可以而且应该将pair reads信息传递给EukCC。因此,只有由至少100个(默认)reads连接的bins才被考虑合并。这极大地提高了速度和准确性。
Preparing your linked reads:
如果你有paired-end read数据,你应该创建一个排序过的比对。如果你有多个读文件,你可以创建多个BAM文件。

为此,你将需要用来创建这个bins的contigs。或者,将所有的bins合并成一个伪组装基因组文件。

cat binfolder/*.fa > pseudo_contigs.fasta
bwa index pseudo_contigs.fasta
bwa mem -t 8 pseudo_contigs.fasta reads_1.fastq.gz reads_2.fastq.gz  |samtools view -q 20 -Sb - |samtools sort -@ 8 -O bam - -o alignment.bam
samtools index alignment.bam

然后,您可以使用EukCC提供的脚本创建一个bin链接表

binlinks.py  --ANI 99 --within 1500 \--out linktable.csv binfolder alignment.bam

如果你有多个bam文件,把它们都传递给脚本(例如*.bam)。
您将获得一个三列文件(bin 1,bin 2,links)。
你可以像这样在相同的文件夹上启动EukCC:

eukcc folder \--out outfolder \--threads 8  \--links linktable.csv \binfolder

EukCC将对所有的bins单独运行。然后,它将识别中等质量的bins,这些bins至少有50%的完整度,但还没有超过100%的改进率。然后,它将识别出至少有100个paid-end reads与这些中等质量仓相连接的bin。如果合并后质量得分上升,这个bin将被合并。

合并的箱子可以在输出文件夹中找到。
合并超过两个bins。因此,将–n_combine设置为任何高于1的值都是试验性的,还不建议使用。我们在合并两个bins时有很好的结果。

示例数据集

我在地衣研究ERP123954的基础上创建了示例数据来测试。使用CONCOCT创建了分组,但任何没有原核生物偏见的分组都可以。

wget ...
gunzip eukcc_example_folder_GT57.zip# Use at least a couple threads to speed it up
eukcc folder --threads 6 \--out output \--links eukcc_example_folder_GT57/links.csv \--n_combine 1 \eukcc_example_folder_GT57/bins

自测数据

  • 不同方法组装的两个真菌
(eukcc) [yut@io02 TestData]$ ll fungi_genome/
总用量 97M
-rw-r--r-- 1 yut lzdx 52M 119 21:03 SX22-37_unicycler_for_only_trimgalore_assembly.fasta
-rw-r--r-- 1 yut lzdx 45M 119 21:03 SX22-37_unicycler_for_trimgalore_and_kraken2_filter_by_PlusPFP_assembly.fasta(eukcc) [yut@io02 TestData]$ time eukcc folder --out eukcc_out  --threads 8 fungi_genome/ --suffix .fasta
09-11-2023 21:05:13:  EukCC version 2.1.0
09-11-2023 21:05:13:  Found 2 bins
09-11-2023 21:10:50:  Searching for marker genes in base database
09-11-2023 21:10:53:  Found 23 marker genes, placing them in the tree using epa-ng
NCBI database not present yet (first time used?)
Downloading taxdump.tar.gz from NCBI FTP site (via HTTP)...
Done. Parsing...
Loading node names...
2541725 names loaded.
313200 synonyms loaded.
Loading nodes...
2541725 nodes loaded.
Linking nodes...
Tree is loaded.
Updating database: /datanode02/yut/.etetoolkit/taxa.sqlite ...2541000 generating entries...
Uploading to /datanode02/yut/.etetoolkit/taxa.sqliteInserting synonyms:      310000
Inserting taxid merges:  70000
Inserting taxids:       2540000
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 13349 was translated into 2813651warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 134006 was translated into 479712warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 134013 was translated into 223615warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 453998 was translated into 2049356warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 2498572 was translated into 1280935warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
/datanode02/yut/Software/Miniconda3/envs/eukcc/lib/python3.10/site-packages/ete3/ncbi_taxonomy/ncbiquery.py:243: UserWarning: taxid 91191 was translated into 3075448warnings.warn("taxid %s was translated into %s" %(taxid, merged_conversion[taxid]))
09-11-2023 21:13:43:  Genome belongs to clade: fungi (Best TaxID: 36048)
09-11-2023 21:13:43:  Searching for marker genes in fungi database
09-11-2023 21:13:45:  Found 10 marker genes, placing them in the tree using epa-ng
09-11-2023 21:14:07:  Automatically locating best SCMG set
09-11-2023 21:14:36:  Searching fasta for selected markers
09-11-2023 21:15:19:  Completeness: 96.62
09-11-2023 21:15:19:  Contamination: 9.02
09-11-2023 21:15:19:  Max silent contamination: 100.0
09-11-2023 21:15:20:  Searching for marker genes in base database
09-11-2023 21:15:22:  Found 19 marker genes, placing them in the tree using epa-ng
09-11-2023 21:16:05:  Genome belongs to clade: fungi (Best TaxID: 147538)
09-11-2023 21:16:05:  Searching for marker genes in fungi database
09-11-2023 21:16:08:  Found 10 marker genes, placing them in the tree using epa-ng
09-11-2023 21:16:29:  Automatically locating best SCMG set
09-11-2023 21:16:57:  Searching fasta for selected markers
09-11-2023 21:17:35:  Completeness: 88.72
09-11-2023 21:17:35:  Contamination: 0.75
09-11-2023 21:17:35:  Max silent contamination: 100.0
09-11-2023 21:17:35:  Found 2 large bins to merge with
09-11-2023 21:17:35:  For bin SX22-37_unicycler_for_only_trimgalore_assembly.fasta we found 1 merging combinations
09-11-2023 21:17:35:  For bin SX22-37_unicycler_for_trimgalore_and_kraken2_filter_by_PlusPFP_assembly.fasta we found 1 merging combinations
09-11-2023 21:17:35:  Created 0 merged binsreal    12m32.333s
user    50m2.338s
sys     2m0.765s
  • 结果
(eukcc) [yut@io02 TestData]$ column -t  eukcc_out/eukcc.csv
bin                                                                            completeness  contamination
SX22-37_unicycler_for_only_trimgalore_assembly.fasta                           96.62         9.02
SX22-37_unicycler_for_trimgalore_and_kraken2_filter_by_PlusPFP_assembly.fasta  88.72         0.75

更多参数

  • single模式
(eukcc) [yut@node02 eukccdb]$ eukcc single --help
usage: eukcc single [-h] [--out OUT] [--db DB] [--threads THREADS] [--threads_epa THREADS_EPA] [--DNA] [--AA] [--taxids TAXIDS [TAXIDS ...]] [--set_size SET_SIZE] [--use_placement USE_PLACEMENT] [--set_number_species SET_NUMBER_SPECIES][--marker_prevalence MARKER_PREVALENCE] [--max_set_size MAX_SET_SIZE] [--select_best_guess] [--select_species] [--use_ncbi_tree] [--gmes] [--ignore_tree] [--simple] [--clade CLADE] [--rerun] [--no_dynamic_root] [--extra][--keep]fastapositional arguments:fasta                 Estimate quality of this single bin (fasta file) # 必须参数options:-h, --help            show this help message and exit--out OUT, -o OUT     Path to output folder (Default: .)--db DB               Path to EukCC DB--threads THREADS, -t THREADSNumber of threads to use (Default: 1)--threads_epa THREADS_EPANumber of threads to use for epa-ng, recommended: 1 (Default: 1)--DNA                 The fasta file contains DNA sequenes--AA                  The fasta file contains amino acid sequences--taxids TAXIDS [TAXIDS ...]Taxids to use as set starting point--set_size SET_SIZE   Minimal number of marker genes to use (Default: 20)--use_placement USE_PLACEMENTPath to previous result file, to use exact same marker gene set--set_number_species SET_NUMBER_SPECIESMinimal number of species to define a set. Reduce this if no sets can be found (Default: 3)--marker_prevalence MARKER_PREVALENCEPercentage of species in which markers should be found (Default: 95)--max_set_size MAX_SET_SIZEMaximal number of marker genes used, set to 0 to include all possible marker genes (Default: 500)--select_best_guess   Use best guess to select marker gene set (Default)--select_species      Use species count to select best marker gene set (Default: best guess)--use_ncbi_tree       Instead of using the EukCC phylogenetic tree, rely on NCBI taxids (default: False)--gmes                Use GeneMark-ES instead of metaeuk (much slower) (default: False)--ignore_tree         Advanced option, mainly for debugging. Can ignore the tree if genomes are knwon via taxids for example--simple              Use global DB instead of clade specific dbs (faster, not suitable for protozoa)--clade CLADE         Define clade as base, fungi, protozoa or plants--rerun, -r           Rerun and remove any previously computed data in the target folder--no_dynamic_root     Do not re-root tree dynamically, to get best set detection (default: True)--extra               Produce extra output files.--keep                Keep workdir after the run.
  • folder模式
(eukcc) [yut@node02 eukccdb]$ eukcc folder --help
usage: eukcc folder [-h] [--links LINKS] [--min_links MIN_LINKS] [--prefix PREFIX] [--suffix SUFFIX] [--out OUT] [--db DB] [--improve_ratio IMPROVE_RATIO] [--improve_percent IMPROVE_PERCENT] [--n_combine N_COMBINE] [--threads THREADS][--threads_epa THREADS_EPA] [--marker_prevalence MARKER_PREVALENCE]binfolderpositional arguments:binfolder             Run script on bins in this folder # 必须参数options:-h, --help            show this help message and exit--links LINKS         Path to a link table generated with bamlinks.py. If suuplied paired reads will be used to refine bins (Recommended)--min_links MIN_LINKSNumber of paired reads matching between bins for merging to happen (default: 100)--prefix PREFIX       Prefix to add for merged bins (default: merged.)--suffix SUFFIX       Suffix (default: .fa) # 输入bins文件名的后缀,默认.fa--out OUT, -o OUT     Path to output folder (Default: .)--db DB               Path to EukCC DB # 未设置EUKCC2_DB环境变量时需要指定该参数--improve_ratio IMPROVE_RATIORatio of completeness to contamination change (Default: 5)--improve_percent IMPROVE_PERCENTA merger must increase completeness at least by n percent (Default: 10)--n_combine N_COMBINEHow many small bins should be merged into a medium sized bin (Default: 1)--threads THREADS, -t THREADSNumber of threads to use (Default: 1)--threads_epa THREADS_EPANumber of threads to use for epa-ng, recommended: 1 (Default: 1)--marker_prevalence MARKER_PREVALENCEPercentage of species in which markers should be found (Default: 95)

参考

Saary, Paul, Alex L. Mitchell, and Robert D. Finn. “Estimating the quality of eukaryotic genomes recovered from metagenomic analysis with EukCC.” Genome biology 21.1 (2020): 1-21.

EukCC GitHub

这篇关于EukCC2评估真核生物MGAs质量的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/378539

相关文章

PR曲线——一个更敏感的性能评估工具

在不均衡数据集的情况下,精确率-召回率(Precision-Recall, PR)曲线是一种非常有用的工具,因为它提供了比传统的ROC曲线更准确的性能评估。以下是PR曲线在不均衡数据情况下的一些作用: 关注少数类:在不均衡数据集中,少数类的样本数量远少于多数类。PR曲线通过关注少数类(通常是正类)的性能来弥补这一点,因为它直接评估模型在识别正类方面的能力。 精确率与召回率的平衡:精确率(Pr

生信代码入门:从零开始掌握生物信息学编程技能

少走弯路,高效分析;了解生信云,访问 【生信圆桌x生信专用云服务器】 : www.tebteb.cc 介绍 生物信息学是一个高度跨学科的领域,结合了生物学、计算机科学和统计学。随着高通量测序技术的发展,海量的生物数据需要通过编程来进行处理和分析。因此,掌握生信编程技能,成为每一个生物信息学研究者的必备能力。 生信代码入门,旨在帮助初学者从零开始学习生物信息学中的编程基础。通过学习常用

生信圆桌x生信分析平台:助力生物信息学研究的综合工具

介绍 少走弯路,高效分析;了解生信云,访问 【生信圆桌x生信专用云服务器】 : www.tebteb.cc 生物信息学的迅速发展催生了众多生信分析平台,这些平台通过集成各种生物信息学工具和算法,极大地简化了数据处理和分析流程,使研究人员能够更高效地从海量生物数据中提取有价值的信息。这些平台通常具备友好的用户界面和强大的计算能力,支持不同类型的生物数据分析,如基因组、转录组、蛋白质组等。

安卓开发板_联发科MTK开发评估套件串口调试

串口调试 如果正在进行lk(little kernel ) 或内核开发,USB 串口适配器( USB 转串口 TTL 适配器的简称)对于检查系统启动日志非常有用,特别是在没有图形桌面显示的情况下。 1.选购适配器 常用的许多 USB 转串口的适配器,按芯片来分,有以下几种: CH340PL2303CP2104FT232 一般来说,采用 CH340 芯片的适配器,性能比较稳定,价

【生物信息学算法】图算法1:概念和算法

文章目录 1. 图的定义、分类、表达方式图的定义图的分类表达方式Python实现 2.相邻节点和度概念定义python实现 3.路径、距离和搜索路径和距离搜索环 4.图论中的欧拉定理 1. 图的定义、分类、表达方式 图的定义 图G可以由两个集合来定义,即G=(V,E)。其中,V是对象的集合,称为图的顶点或节点; E是V中(u,v)顶点对的集合,称为边或弧,表示u和v之间的关系

【无线通信发展史⑧】测量地球质量?重力加速度g的测量?如何推导单摆周期公式?地球半径R是怎么测量出来的?

前言:用这几个问答形式来解读下我这个系列的来龙去脉。如果大家觉得本篇文章不水的话希望帮忙点赞收藏加关注,你们的鼓舞是我继续更新的动力。 我为什么会写这个系列呢? 首先肯定是因为我本身就是一名从业通信者,想着更加了解自己专业的知识,所以更想着从头开始了解通信的来源以及在每一个时代的发展进程。 为什么会从头开始写通信? 我最早是学习了中华上下五千年,应该说朝代史,这个算个人兴趣,从夏

提升汽车制造质量:矫平技术在车门平整化中的应用

汽车制造业对每一个部件的精细度都有着极高的要求,尤其是车门这样的关键组件。车门不仅需要提供良好的密封性,还要在外观上展现出车辆的高端品质。然而,生产过程中的不平整问题往往成为提升制造质量的障碍。矫平技术的应用,为解决这一问题提供了有效的手段。 车门平整度的重要性 车门的平整度对于车辆的整体性能和美观至关重要。不平整的车门可能导致密封不良、噪音增大,甚至影响车门的正常开启和关闭。因此,确保车门的

运动耳机哪个牌子的质量好?五款口碑绝佳机型安利!

​喜欢户外活动的你,肯定是个有格调的人。想象一下,如果在户外的时候,能戴上一款耳机,不仅跟环境搭,还能让你享受到超棒的音乐,那感觉得多爽!开放式耳机就是为这个目的设计的,它不塞耳朵,戴着更舒服,音质也棒,让你在户外能更好地感受到周围自然的声音。这耳机现在超受欢迎,作为一个既爱户外又爱数码的发烧友,我自己也试过不少款,它们真的给我的户外探险加了不少分。接下来,我会跟大家分享这些耳机的亮点,帮你挑出自

随着人们网络安全意识提高,软件架构设计与评估也成为重中之重

目录 案例 【题目】 【问题 1】(13 分) 【问题 2】(12分) 【答案】 【问题 1】答案 【问题 2】答案 相关推荐 案例         阅读以下关于软件架构设计与评估的叙述,回答问题 1 和问题 2。 【题目】         某电子商务公司为正更好地管理用户,提升企业销售业绩,拟开发一套用户管理系统。该系统的基本功能是根据用户的消费级别、消费历史、信

如何利用ChatGPT提升学术论文讨论部分的撰写质量和效率

大家好,感谢关注。我是七哥,一个在高校里不务正业,折腾学术科研AI实操的学术人。关于使用ChatGPT等AI学术科研的相关问题可以和作者七哥(yida985)交流,多多交流,相互成就,共同进步,为大家带来最酷最有效的智能AI学术科研写作攻略。经过数月爆肝,终于完成学术AI使用教程,估计也有个50万字的详细操作指南。跟着一步一步操作,借助ChatGPT做学术、干科研、写论文、课题申报都变得超简单。欢