Skip to content

Commit

Permalink
Update to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
heathcliff233 committed Apr 20, 2024
1 parent d466905 commit a9c8c39
Show file tree
Hide file tree
Showing 20 changed files with 643 additions and 980 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

*.pt
*.ckpt
__pycache__/
*.py[cod]
*$py.class
*.DS_Store
Empty file removed FastMsaApp/__init__.py
Empty file.
16 changes: 0 additions & 16 deletions FastMsaApp/asgi.py

This file was deleted.

84 changes: 0 additions & 84 deletions FastMsaApp/fm_app.py

This file was deleted.

126 changes: 0 additions & 126 deletions FastMsaApp/settings.py

This file was deleted.

27 changes: 0 additions & 27 deletions FastMsaApp/thread_util.py

This file was deleted.

26 changes: 0 additions & 26 deletions FastMsaApp/urls.py

This file was deleted.

16 changes: 0 additions & 16 deletions FastMsaApp/wsgi.py

This file was deleted.

40 changes: 5 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,42 +41,12 @@ optional arguments:
* output_path: output dir -- seq/db/res, seq subdir contain all queries, db contain retrieved db, res contain all results
* database_path: directory containing database in DataFrame and embedding saved in faiss index. All results produced in Offline Embedding section.



## Server Mode Usage (Advanced Usage)

For the server administor, Django is required to deploy the server like this:

```
nohup python3 manage.py runserver 0.0.0.0:7077 >> nohup_xxx.out 2>&1 &
```

Manage the backend's max workers

Find the max_worker config(FastMsaApp/fm_app.py: line 32), change the value.
The number of max_workers is recommend is `32`.



Send a request by http content:
```
# Use curl
curl --location --request POST 'http://0.0.0.0:7077/fastmsa' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'input=/user/linmingzhi/project/fastmsa/example/1pazA.fasta' \
--data-urlencode 'output=/user/linmingzhi/output/fastmsa/test026' \
--data-urlencode 'tarnum=320000'
## Structure prediction (Optional)
Install ColabFold
```

## Server Test Mode (Advanced Usage)
```
# Run a server instance hang on
python manage.py runserver 0.0.0.0:7077
pip install -q --no-warn-conflicts 'colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold
```

## One-line Submission Command (Advanced Usage)

For fastMSA only, try the following one-line command:
Run batch prediction
```
./fastMSA.sh -i example/1pazA.fasta
colabfold_batch $MSA_DIR $PREDICTION_RES
```
30 changes: 30 additions & 0 deletions conf/scale_conf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
trainer:
master_port: "39533"
devices: "0"
gpus: [0]
seed: 1234
acc_step: 4
accelerator: "cuda"
strategy: ddp_find_unused_parameters_true
precision: 16
batch_size: 600
max_epochs: 100
ur90_path: /mnt/data/aim/hongliang/uniref30_202103/uniref30_2103.tsv

model:
resume: False
ckpt_path: ./ckpt

callback:
monitor: val_acc
dirpath: ./model_uni/
filename: pl_biencoder-{epoch:03d}-{val_acc:.4f}
mode: max
save_top_k: 5
save_on_train_epoch_end: True

logger:
log_every_n_steps: 10
use_wandb: False
project: uniclust_pl
log_model: False
Empty file removed db.sqlite3
Empty file.
Loading

0 comments on commit a9c8c39

Please sign in to comment.