This commit is contained in:
2023-12-03 22:20:39 +08:00
parent 6c138447c8
commit de8706dc53

254
README.md
View File

@@ -1,93 +1,225 @@
# mutation
## 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
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```shel
apt update && apt install curl wget git -y
```
cd existing_repo
git remote add origin http://gitlab.dockless.eu.org/lingyuzeng/mutation.git
git branch -M main
git push -uf origin main
```shell
conda activate base
conda install -c conda-forge biopython pyrosetta loguru click pymol-open-source -y # 安装日志库 # ! pyrosetta 很大需要配置私有源
```
## Integrate with your tools
## mutation.py test
- [ ] [Set up project integrations](http://gitlab.dockless.eu.org/lingyuzeng/mutation/-/settings/integrations)
### evoEF2 test
## Collaborate with your team
#### install
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
```shell
unzip EvoEF2-master.zip
cd EvoEF2-master
./build.sh
```
## Test and Deploy
```shell
python mutation.py evoef2 -p 4i24.pdb -m test.list
```
Use the built-in continuous integration in GitLab.
### foldX test
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
```shell
python mutation.py foldx -p 4i24.pdb -m test.list
```
***
### rosetta test
# Editing this README
```shell
python mutation.py rosetta -p 4i24.pdb -m test.list
```
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
### scwrl4 test
## Suggestions for a good README
install : `chmod +x install_scwrl4.0.2_64bit_2020_linux`
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
```shell
python mutation.py scwrl4 -p 4i24.pdb -m test.list
```
## Name
Choose a self-explaining name for your project.
### opus-mut test
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
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.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
2. List the backbone paths in bb_list.
ls *bb > bb_list
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
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.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
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. .
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
根据opus-mut的软件使用教程来看opus仅支持单链进行突变也就是说如果需要对多链进行突变需要对多链单链分割然后对分割后的多链进行突变然后再将突变后的单链进行合并。
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
注意opus-mut需要从[github仓库](https://github.com/thuxugang/opus_mut/tree/main)获取
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
### pymol test
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
```shell
python mutation.py pymol -p 4i24.pdb -c B -r 797 -t GLY
```
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
### 统一接口调用
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
完成 2023-08-22
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
### 调用方法统一为 test.list文件方便多位点突变
## License
For open source projects, say how it is licensed.
完成 2023-08-25
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
### 封装环境至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
```