Skip to content

Commit

Permalink
Update readme and the msa selection service.
Browse files Browse the repository at this point in the history
Zimiao1025 committed Jun 25, 2024
1 parent b9a2c4c commit 9053d88
Showing 6 changed files with 38 additions and 25 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,9 @@
- Flower for monitoring the Celery tasks

## Introduction
AIRFold is
![AIRFold Framework](imgs/Frame.png)

AIRFold is an open-source platform for protein structure prediction.

## Quick Start

@@ -103,25 +105,32 @@ Please follow these steps:
## Command for different functions

### Multiple sequence alignment generation

```bash
python run_mode.py --input_path example.fasta --mode msa
```
```bash
# Input: Protein sequences in fasta format.
# Output: Multiple sequence alignment results in a3m format.
python run_mode.py --input_path example.fasta --mode msa
```
### Pretrained embedding generation

```bash
python run_mode.py --input_path example.fasta --mode feature
```
```bash
# Input: Protein sequences in fasta format.
# Output: Generated sequence embeddings in pickle format.
python run_mode.py --input_path example.fasta --mode feature
```
### Protein contact map prediction

```bash
python run_mode.py --input_path example.fasta --mode disgram
```
```bash
# Input: Protein sequences in fasta format.
# Output: Generated contact map in pickle format.
python run_mode.py --input_path example.fasta --mode disgram
```

### Protein structure prediction

```bash
python run_mode.py --input_path example.fasta --mode pipline
```
```bash
# Input: Protein sequences in fasta format.
# Output: Protein structure in pdb format.
python run_mode.py --input_path example.fasta --mode pipline
```


2 changes: 1 addition & 1 deletion batch_run.py
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ def main():
# json_file = argv.input_path
# with open("./tmp/temp_5000_128_1_mmseqs.json", 'r') as jf:
# request_dict = json.load(jf)
with open("./tmp/temp_10000_128_1_plmsim.json", 'r') as jf:
with open("./tmp/temp_6000_64_1_plmsim.json", 'r') as jf:
request_dict = json.load(jf)

# weeks = ['2024.02.17', '2024.02.24', '2024.03.02', '2024.03.09',
2 changes: 1 addition & 1 deletion gui/stats.html

Large diffs are not rendered by default.

Binary file added imgs/Frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions services/alphafold/worker.py
Original file line number Diff line number Diff line change
@@ -285,7 +285,7 @@ def run(self):
key_list = list(str_dict.keys())
msa_paths = []
for idx in range(len(key_list)):
selected_msa_path = ptree.strategy.strategy_list[idx] + "_dp.a3m"
selected_msa_path = str(ptree.strategy.strategy_list[idx]) + "_dp.a3m"
msa_paths.append(str(selected_msa_path))

# get selected_template_feat
@@ -428,9 +428,10 @@ def run(self):
# get msa_path
str_dict = misc.safe_get(self.requests[0], ["run_config", "msa_select"])
key_list = list(str_dict.keys())
for index in range(len(key_list)):
selected_msa_path = ptree.strategy.strategy_list[index]
msa_paths = [str(selected_msa_path)]
msa_paths = []
for idx in range(len(key_list)):
selected_msa_path = str(ptree.strategy.strategy_list[idx]) + "_dp.a3m"
msa_paths.append(str(selected_msa_path))

# get selected_template_feat
selected_template_feat_path = str(ptree.alphafold.selected_template_feat)
13 changes: 8 additions & 5 deletions services/selectmsa/worker.py
Original file line number Diff line number Diff line change
@@ -142,15 +142,18 @@ def build_command(self, request: Dict[str, Any]) -> list:
for idx in range(len(key_list)):
"""TODO current implementation could not be compatible with ABA-like strategy"""

method_ = select_args[key_list[idx]]
method_ = key_list[idx]
logger.info(f"The Method for msa selection: {method_}")
executed_file = (Path(__file__).resolve().parent / "lib" / "strategy" / f"{method_}.py")
input_fasta_path = str(ptree.seq.fasta)
self.output_prefix = ptree.strategy.strategy_list[idx]
self.output_prefix.parent.mkdir(exist_ok=True, parents=True)
output_prefix = ptree.strategy.strategy_list[idx]
output_prefix.parent.mkdir(exist_ok=True, parents=True)
self.output_prefix = str(output_prefix)

for tag in select_args[method_]["least_seqs"]:
ls_dict = misc.safe_get(select_args, [method_, "least_seqs"])
for tag in ls_dict.keys():

least_seqs = select_args[method_]["least_seqs"][tag]
least_seqs = ls_dict[tag]
if tag == "hj" and "hhblits" in search_args.keys() and "jackhmmer" in search_args.keys():
input_path = str(ptree.search.integrated_search_hj_a3m_dp)
if tag == "bl" and "blast" in search_args.keys():

0 comments on commit 9053d88

Please sign in to comment.