跳转到主要内容

蛋白质嵌入生成和可视化的管道

项目描述

Bio Embeddings

了解bio_embeddings的资源

项目目标

  • 通过提供单一、一致的接口和接近零摩擦,简化基于语言模型生物序列表示的迁移学习。
  • 可重现的工作流程
  • 表示深度(不同实验室在不同数据集上为不同目的训练的不同模型)
  • 丰富的示例,处理复杂性为用户(例如,CUDA OOM 抽象)以及详细的警告和错误消息。

项目包括

  • 基于在生物序列表示上训练的开放模型(SeqVec、ProtTrans、UniRep 等)的通用 Python 嵌入器
  • 一个管道
    • 将序列嵌入到矩阵表示(每个氨基酸)或向量表示(每个序列),可用于训练学习模型或分析目的
    • 使用 UMAP 或 t-SNE 将每个序列嵌入投影到低维表示(用于轻量级数据处理和可视化)
    • 将低维的每个序列嵌入集可视化到 2D 和 3D 交互图中(带注释和不带注释)
    • 使用监督方法(如有可用)和无监督方法(例如,通过网络分析)从每个序列和每个氨基酸嵌入中提取注释
  • 一个网络服务器,将管道封装成分布式 API,以实现可扩展和一致的工作流程

安装

您可以通过 pip 安装 bio_embeddings 或使用 Docker。

Pip

安装管道的方法如下

pip install bio-embeddings[all]

要安装不稳定版本,请按照以下方法安装管道

pip install -U "bio-embeddings[all] @ git+https://github.com/sacdallago/bio_embeddings.git"

Docker

我们提供 Docker 镜像 ghcr.io/bioembeddings/bio_embeddings。简单的使用示例

docker run --rm --gpus all \
    -v "$(pwd)/examples/docker":/mnt \
    -v bio_embeddings_weights_cache:/root/.cache/bio_embeddings \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    ghcr.io/bioembeddings/bio_embeddings:v0.1.6 /mnt/config.yml

有关说明,请参阅 docker 目录中的示例,您还可以使用 ghcr.io/bioembeddings/bio_embeddings:latest,它基于最新的提交构建。

安装说明

bio_embeddings 是为具有 GPU 功能并安装了 CUDA 的 Unix 机器开发的。如果您的设置与此不同,您可能会遇到一些不一致(例如,速度受到没有 GPU 和 CUDA 的显著影响)。对于 Windows 用户,我们强烈建议使用 Windows Subsystem for Linux

哪种模型适合您?

每种模型都有其优点和缺点(速度、特异性、内存占用...)。没有“万能”的模型,我们鼓励您在尝试新的探索性项目时至少尝试两种不同的模型。

模型 prottrans_bert_bfdprottrans_albert_bfdseqvecprottrans_xlnet_uniref100 都是为了系统预测而训练的。从这个池中,我们认为最佳模型是 prottrans_bert_bfd,其次是 seqvec,它已经建立较长时间且使用不同的原则(LSTM 对 Transformer)。

使用和示例

我们强烈建议您查看 examples 目录中的管道示例,以及 notebooks 目录中的后处理管道运行和通用嵌入器使用。

安装软件包后,您可以

  1. 使用管道如下

    bio_embeddings config.yml
    

    配置文件的蓝图,此存储库的 examples 目录中有一个示例设置。

  2. 通过 Python 使用通用嵌入器对象,例如

    from bio_embeddings.embed import SeqVecEmbedder
    
    embedder = SeqVecEmbedder()
    
    embedding = embedder.embed("SEQVENCE")
    

    更多示例可以在此存储库的 notebooks 目录中找到。

引用

如果您在研究中使用 bio_embeddings,我们将非常感谢您引用以下论文

Dallago, C.,Schütze, K.,Heinzinger, M.,Olenyi, T.,Littmann, M.,Lu, A. X.,Yang, K. K.,Min, S.,Yoon, S.,Morton, J. T.,& Rost, B.(2021)。从深度学习到可视化和预测蛋白质集的学习嵌入。Current Protocols,1,e113。doi:10.1002/cpz1.113

相应的 bibtex

@article{https://doi.org/10.1002/cpz1.113,
author = {Dallago, Christian and Schütze, Konstantin and Heinzinger, Michael and Olenyi, Tobias and Littmann, Maria and Lu, Amy X. and Yang, Kevin K. and Min, Seonwoo and Yoon, Sungroh and Morton, James T. and Rost, Burkhard},
title = {Learned Embeddings from Deep Learning to Visualize and Predict Protein Sets},
journal = {Current Protocols},
volume = {1},
number = {5},
pages = {e113},
keywords = {deep learning embeddings, machine learning, protein annotation pipeline, protein representations, protein visualization},
doi = {https://doi.org/10.1002/cpz1.113},
url = {https://currentprotocols.onlinelibrary.wiley.com/doi/abs/10.1002/cpz1.113},
eprint = {https://currentprotocols.onlinelibrary.wiley.com/doi/pdf/10.1002/cpz1.113},
year = {2021}
}

Additionally, we invite you to cite the work from others that was collected in `bio_embeddings` (see section _"Tools by category"_ below). We are working on an enhanced user guide which will include proper references to all citable work collected in `bio_embeddings`.

贡献者

  • 克里斯蒂安·达尔拉戈(负责人)
  • 康斯坦丁·舒策
  • 托比亚斯·奥莱尼
  • 迈克尔·海因茨inger

工具列表不完整(更多详细信息请参阅下一节)

数据集

  • prottrans_t5_xl_u50人类蛋白质组全精度的残基和序列嵌入 + 二级结构预测 + 亚细胞定位预测:[DOI链接图片] DOI

按类别划分的工具

管道
通用嵌入器

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源分发

bio_embeddings-0.2.2.tar.gz (72.6 kB 查看哈希值)

上传时间

构建版本

bio_embeddings-0.2.2-py3-none-any.whl (105.4 kB 查看哈希值)

上传时间 Python 3

由以下支持