Mercurial > repos > bimib > cobraxy
comparison COBRAxy/src/rps_generator.py @ 542:fcdbc81feb45 draft
Uploaded
| author | francesco_lapi |
|---|---|
| date | Sun, 26 Oct 2025 19:27:41 +0000 |
| parents | 2fb97466e404 |
| children | 5d5583dc6082 |
comparison
equal
deleted
inserted
replaced
| 541:fa93040a75af | 542:fcdbc81feb45 |
|---|---|
| 12 import pickle as pk | 12 import pickle as pk |
| 13 import pandas as pd | 13 import pandas as pd |
| 14 | 14 |
| 15 from typing import Optional, List, Dict | 15 from typing import Optional, List, Dict |
| 16 | 16 |
| 17 import utils.general_utils as utils | 17 try: |
| 18 import utils.reaction_parsing as reactionUtils | 18 from .utils import general_utils as utils |
| 19 from .utils import reaction_parsing as reactionUtils | |
| 20 except: | |
| 21 import utils.general_utils as utils | |
| 22 import utils.reaction_parsing as reactionUtils | |
| 19 | 23 |
| 20 ########################## argparse ########################################## | 24 ########################## argparse ########################################## |
| 21 ARGS :argparse.Namespace | 25 ARGS :argparse.Namespace |
| 22 def process_args(args:List[str] = None) -> argparse.Namespace: | 26 def process_args(args:List[str] = None) -> argparse.Namespace: |
| 23 """ | 27 """ |
| 36 | 40 |
| 37 parser.add_argument("-rl", "--model_upload", type = str, | 41 parser.add_argument("-rl", "--model_upload", type = str, |
| 38 help = "path to input file containing the reactions") | 42 help = "path to input file containing the reactions") |
| 39 | 43 |
| 40 parser.add_argument('-td', '--tool_dir', | 44 parser.add_argument('-td', '--tool_dir', |
| 41 type = str, | 45 type = str, |
| 42 required = True, | 46 default = os.path.dirname(os.path.abspath(__file__)), |
| 43 help = 'your tool directory') | 47 help = 'your tool directory (default: auto-detected package location)') |
| 48 | |
| 44 parser.add_argument('-ol', '--out_log', | 49 parser.add_argument('-ol', '--out_log', |
| 45 help = "Output log") | 50 help = "Output log") |
| 46 parser.add_argument('-id', '--input', | 51 parser.add_argument('-id', '--input', |
| 47 type = str, | 52 type = str, |
| 48 required = True, | 53 required = True, |
