文末提供程序和源码下载
nn4dms开源程序是用于深度突变扫描数据的神经网络
我们在五个深度突变扫描数据集上训练和评估了多种类型的神经网络的性能。此存储库包含允许您执行以下作的代码和示例:
This code is based on Python 3.6 and TensorFlow 1.14. Use the provided environment.yml file to set up a suitable environment with Anaconda.
此代码基于 Python 3.6 和 TensorFlow 1.14。使用提供的 environment.yml 文件为 Anaconda 设置合适的环境。
conda env create -f environment.yml
conda activate nn4dms
Installation typically takes approximatley 5 minutes. Note these software versions differ slightly from the ones we used to train the models in our publication.
安装通常需要大约 5 分钟。请注意,这些软件版本与我们在本出版物中用于训练模型的版本略有不同。
By default, the environment uses CPU-only TensorFlow. If you have an NVIDIA GPU and want GPU support, use the environment_gpu.yml file instead. It will install tensorflow-gpu
instead of tensorflow
. You will need to make sure you have the appropriate CUDA drivers and software installed for TensorFlow 1.14: cudnn 7.4 and cudatoolkit 10.0. Certain versions of this NVIDIA software may also be available for your operating system via Anaconda. The GPU environment is not compatible with NVIDIA Ampere or newer microarchitectures.
默认情况下,该环境使用仅限 CPU 的 TensorFlow。如果您有 NVIDIA GPU 并希望获得 GPU 支持,请改用 environment_gpu.yml 文件。它将安装 tensorflow-gpu
,而不是 tensorflow
。您需要确保为 TensorFlow 1.14 安装了合适的 CUDA 驱动程序和软件: cudnn 7.4 和 cudatoolkit 10.0。此 NVIDIA 软件的某些版本也可能通过 Anaconda 可用于您的作系统。GPU 环境与 NVIDIA Ampere 或更新的微架构不兼容。
We used Enrich2 to compute functional scores for the GB1 and Bgl3 datsets. If you want to re-run that part of our pipeline, you must install Enrich2 according to the instructions on the Enrich2 GitHub page. Make sure the conda environment for Enrich2 is named "enrich2". This is optional; we provide pre-computed datasets in the data directory.
我们使用 Enrich2 来计算 GB1 和 Bgl3 数据集的功能分数。如果您想重新运行我们管道的该部分,则必须按照 Enrich2 GitHub 页面上的说明安装 Enrich2。确保 Enrich2 的 conda 环境命名为“enrich2”。这是可选的;我们在 data 目录中提供了预计算的数据集。
您可以通过调用 code/regression.py 来训练模型,并使用指定数据集、网络架构、训练-测试拆分等的所需参数。为方便起见,除了命令行参数之外,regression.py 还接受 arguments 文本文件。我们提供了一个示例参数文件,您可以将其用作模板。
Call the following from the root directory to train a sample linear regression model on the avGFP dataset:
从根目录调用以下内容,以在 avGFP 数据集上训练示例线性回归模型:
python code/regression.py @regression_args/example.txt
The output, which includes the trained model, evaluation metrics, and predictions on each of the train/tune/tests sets, will automatically be placed in the training_logs directory. The linear regression example above trains in less than 5 minutes. Training time will be longer for larger datasets and more complex models.
输出(包括经过训练的模型、评估指标和对每个 train/tune/tests 集的预测)将自动放置在 training_logs 目录中。上面的线性回归示例在不到 5 分钟的时间内完成训练。对于较大的数据集和更复杂的模型,训练时间会更长。
For a full list of parameters, call python code/regression.py -h
.
有关参数的完整列表,请调用 python code/regression.py -h
。
在训练期间,regression.py 会将各种有用的信息保存到日志目录中,包括对所有 train、tune 和测试集变体以及训练模型本身的预测。
迅雷云盘
本文信息来源于GitHub作者地址:https://github.com/gitter-lab/nn4dms