Files
mutation/README.md
2023-12-03 22:20:39 +08:00

225 lines
8.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## progress
- [*] def 函数1输入蛋白pdb和突变list输出突变后的pdb{调用EvoEF2突变}
- [*] def 函数2输入蛋白pdb和突变list输出突变后的pdb{调用Scwrl4突变}
- [*] def 函数3输入蛋白pdb和突变list输出突变后的pdb{调用foldx突变}
- [*] def 函数4输入蛋白pdb和突变list输出突变后的pdb{调用rosetta突变}
- [ ] def 函数5输入蛋白pdb和突变list输出突变后的pdb{调用opus-mut突变}
- [*] def 函数5输入蛋白pdb和突变list输出突变后的pdb{调用pymol突变}
## install
```shel
apt update && apt install curl wget git -y
```
```shell
conda activate base
conda install -c conda-forge biopython pyrosetta loguru click pymol-open-source -y # 安装日志库 # ! pyrosetta 很大需要配置私有源
```
## mutation.py test
### evoEF2 test
#### install
```shell
unzip EvoEF2-master.zip
cd EvoEF2-master
./build.sh
```
```shell
python mutation.py evoef2 -p 4i24.pdb -m test.list
```
### foldX test
```shell
python mutation.py foldx -p 4i24.pdb -m test.list
```
### rosetta test
```shell
python mutation.py rosetta -p 4i24.pdb -m test.list
```
### scwrl4 test
install : `chmod +x install_scwrl4.0.2_64bit_2020_linux`
```shell
python mutation.py scwrl4 -p 4i24.pdb -m test.list
```
### opus-mut test
1. Use mk_mut_backbone.py to generate original WT backbone file and mutants backbones.
In this step, you need to set the original PDB file path in line 97 native_filepath = ./3phv.pdb. Then set the mutations you want in line 108 mutations = ["P9Y", "V82I", "V82G", "I84N", "L90R"]. Here, we use hiv.pdb and mutation Q2E as an example.
2. List the backbone paths in bb_list.
ls *bb > bb_list
3. Use run_opus_mut.py to generate the results of OPUS-Mut (.mut).
In this step, you need to activate the environment created by mut.yml file. Also, a GPU device is required and should be set in line 13 os.environ["CUDA_VISIBLE_DEVICES"] = "0". cuda10.1 is also required.
4. Use get_difference_summation.py to calculate the differences between WT and mutants (.changes).
In this step, you need to set the original PDB file name in line 20 ori_name = "3phv", and line 115 if filename == "3phv": continue. Note that, the code line 130 if not int(resid) in [25, 26, 27]: continue can be used to calculate the differences from specific residues (Sdiff_critical). When calculating the differences from all residues (Sdiff), you need to comment this line, and also uncomment the line between 134-143 to avoid the influence of outliers. .
根据opus-mut的软件使用教程来看opus仅支持单链进行突变也就是说如果需要对多链进行突变需要对多链单链分割然后对分割后的多链进行突变然后再将突变后的单链进行合并。
注意opus-mut需要从[github仓库](https://github.com/thuxugang/opus_mut/tree/main)获取
### pymol test
```shell
python mutation.py pymol -p 4i24.pdb -c B -r 797 -t GLY
```
### 统一接口调用
完成 2023-08-22
### 调用方法统一为 test.list文件方便多位点突变
完成 2023-08-25
### 封装环境至docker镜像
### 使用scwrl4进行残基序列突变
测试:
```shell
python mutation.py scwrl4 -p 4i24.pdb -m test.list
```
## construct docker images
```shell
docker cp /home/share_data/opus_mut.zip a97ed867a713:/work
```
## Docker 镜像使用
```shell
rm ../dockertest/* -rf && cp ../4i24.pdb ../dockertest && cp ../test.list ../dockertest
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/work hotwa/mutation:latest <software> -p /work/4i24.pdb -m /work/test.list
# example
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/work hotwa/test2:latest rosetta -p /work/4i24.pdb -m /work/test.list
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/work hotwa/test2:latest scwrl4 -p /work/4i24.pdb -m /work/test.list
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/work hotwa/test2:latest evoef2 -p /work/4i24.pdb -m /work/test.list
```
### 非root测试
```shell
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/home/developer/work hotwa/test1:latest rosetta -p /home/developer/work/4i24.pdb -m /home/developer/work/test.list
```
### 构建docker镜像
缺少`pyrosetta-2023.31+release.1799523-py311_0.tar.bz2`文件,需要从官网下载手动安装,太大了。上传太慢
相关资源文件:
资源盘
[网盘](https://pan.baidu.com/s/1auuSM4rcQUC_gcYBwyRSXA?pwd=vfcu )
链接https://pan.baidu.com/s/1auuSM4rcQUC_gcYBwyRSXA?pwd=vfcu
提取码vfcu
### 突变文件介绍
突变文件格式
文件名: individual_list.txt
内容结构:
每个突变写在一行上,以“;”结束。
一个突变中的多个单点突变用“,”分隔。
突变表示:
第一个字母是参考氨基酸(原氨基酸)。
第二个字母是氨基酸所在的链标识符。
紧跟着的数字是氨基酸在链中的位置。
最后一个字母是突变后的氨基酸。
示例:
```shell
CA171A,DB180E;
```
第一个突变链A上位置171的C半胱氨酸突变为A丙氨酸
第二个突变链B上位置180的D天冬氨酸突变为E谷氨酸
注意:
不应有空格或其他多余字符。
这种格式允许用户明确指定在蛋白质复合体中哪些氨基酸应进行突变,从而提供高度定制的突变模型。
### docker build
```shell
docker build --progress=plain -t hotwa/mutation:latest -f developer.Dockerfile .
```
test
```shell
docker run --rm --entrypoint /bin/bash --user=1000:1000 -it -v ./test:/home/developer/work hotwa/mutation:latest
```
Docker 镜像使用
```shell
docker run --rm -it -v /home/zenglingyu/tools/dockertest:/work hotwa/mutation:latest <software> -p /work/4i24.pdb -m /work/individual_list.txt
# example
docker run --rm -it -v ./test:/home/developer/work hotwa/mutation:latest rosetta -p /home/developer/work/4i24.pdb -m /home/developer/work/individual_list.txt
docker run --rm -it -v ./test:/home/developer/work hotwa/mutation:latest scwrl4 -p /home/developer/work/4i24.pdb -m /home/developer/work/individual_list.txt
docker run --rm -it -v ./test:/home/developer/work hotwa/mutation:latest evoef2 -p /home/developer/work/4i24.pdb -m /home/developer/work/individual_list.txt
docker run --rm -it -v ./test:/home/developer/work hotwa/mutation:latest pymol -p /home/developer/work/4i24.pdb -m /home/developer/work/individual_list.txt
docker run --rm -it -v ./test:/home/developer/work hotwa/mutation:latest foldx -p /home/developer/work/4i24.pdb -m /home/developer/work/individual_list.txt
```
## 2023-9-20 2023-9-21
--no-fix 不修复
突变残基周围也不修复
pymol版本优先提供
flodx: 默认删除ATOM其他结构强制删除会自动修复可关闭
pymol仅突变修复突变残基周围的构象
scwrl4: 只能预测侧链,会改变蛋白构象
pyrosetta: 会尝试自动修复,不断报错,直到程序终止
evoef2: 报错pdb格式无法修复
```shell
############################################################################################
EvoEF2
A framework for macromolecular modeling, e.g.,protein design, protein side-chain packing,
protein structure energy minimization, add and optimize hydrogen bonds, build mutant model,
calculate protein folding stability, calculate protein-protein binding free energy, etc
Copyright (c) Xiaoqiang Huang (xiaoqiah@umich.edu; tommyhuangthu@foxmail.com)
Dept. of Computational Medicine & Bioinformatics
Medical School
University of Michigan
############################################################################################
command BuildMutant works
coordinate of atom H on residue A ASN 70 is invalid, please check
ValueError: in file src/Residue.cpp function ResidueCalcAllAtomXYZ() line 729, not all atoms' XYZ can be calculated for residue ASN in chain A 70
ValueError: in file src/Chain.cpp function ChainCalcAllAtomXYZ() line 208
2023-09-21 14:42:43.468 | ERROR | __main__:evoEF2base:163 - 1jpz_mcpbpy_Model_0001.pdb mutation failed! mutation line: CA62G,FA87V,AA74Q,SA72G;
2023-09-21 14:42:43.469 | INFO | __main__:execute_evoef2:496 - EvoEF2 mutation 1jpz_mcpbpy.pdb finished
```