Skip to content

Commit

Permalink
set default path for the -md option
Browse files Browse the repository at this point in the history
  • Loading branch information
mark0428 authored and mark0428 committed Sep 26, 2021
1 parent 28925ae commit 4d3293c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ Expected output: 1) The model weights trained using the specified data; 2) Test

### Predict

Usage: `python AMPlify.py [-h] -md MODEL_DIR [-m MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME] -s SEQS [-od OUT_DIR] [-of {txt,tsv}] [-att {on,off}]`
Usage: `python AMPlify.py [-h] [-md MODEL_DIR] [-m MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME] -s SEQS [-od OUT_DIR] [-of {txt,tsv}] [-att {on,off}]`
```
optional arguments:
-h, --help Show this help message and exit
-md MODEL_DIR, --model_dir MODEL_DIR
Directory of where models are stored
Directory of where models are stored (optional)
-m MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME, --model_name MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME MODEL_NAME
File names of 5 trained models (optional)
-s SEQS, --seqs SEQS Sequences for prediction, fasta file
Expand All @@ -84,7 +84,7 @@ optional arguments:
Whether to output attention scores, on or off (optional)
```
Example: `python AMPlify.py -md ../models/ -s ../data/AMP_test_20190414.fa`
Example: `python AMPlify.py -s ../data/AMP_test_20190414.fa`

Expected output: Predicted confident scores and classes of the input sequences.

Expand Down
5 changes: 3 additions & 2 deletions src/AMPlify.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,15 @@ def main():
'''),
formatter_class=argparse.RawDescriptionHelpFormatter)

parser.add_argument('-md', '--model_dir', help="Directory of where models are stored", required=True)
parser.add_argument('-md', '--model_dir', help="Directory of where models are stored (optional)",
default=os.path.dirname(os.path.dirname(os.path.realpath(__file__)))+'/models', required=False)
parser.add_argument('-m', '--model_name', nargs=5, help="File names of 5 trained models (optional)",
default=['model_weights_1.h5', 'model_weights_2.h5', 'model_weights_3.h5',
'model_weights_4.h5', 'model_weights_5.h5'], required=False)
parser.add_argument('-s', '--seqs', help="Sequences for prediction, fasta file", required=True)
parser.add_argument('-od', '--out_dir', help="Output directory (optional)", default=os.getcwd(), required=False)
parser.add_argument('-of', '--out_format', help="Output format, txt or tsv (optional)",
choices=['txt', 'tsv'], default='txt', required=False)
choices=['txt', 'tsv'], default='tsv', required=False)
parser.add_argument('-att', '--attention', help="Whether to output attention scores, on or off (optional)",
choices=['on', 'off'], default='off', required=False)

Expand Down

0 comments on commit 4d3293c

Please sign in to comment.