Mercurial > repos > bimib > cobraxy
comparison COBRAxy/src/exportMetabolicModel.py @ 542:fcdbc81feb45 draft
Uploaded
| author | francesco_lapi |
|---|---|
| date | Sun, 26 Oct 2025 19:27:41 +0000 |
| parents | 7d5b35c715e8 |
| children |
comparison
equal
deleted
inserted
replaced
| 541:fa93040a75af | 542:fcdbc81feb45 |
|---|---|
| 8 import os | 8 import os |
| 9 import cobra | 9 import cobra |
| 10 import argparse | 10 import argparse |
| 11 from typing import List | 11 from typing import List |
| 12 import logging | 12 import logging |
| 13 import utils.model_utils as modelUtils | 13 |
| 14 try: | |
| 15 from .utils import model_utils as modelUtils | |
| 16 from .utils import general_utils as utils | |
| 17 except: | |
| 18 import utils.model_utils as modelUtils | |
| 19 import utils.general_utils as utils | |
| 14 | 20 |
| 15 ARGS : argparse.Namespace | 21 ARGS : argparse.Namespace |
| 16 def process_args(args: List[str] = None) -> argparse.Namespace: | 22 def process_args(args: List[str] = None) -> argparse.Namespace: |
| 17 """ | 23 """ |
| 18 Parse command-line arguments for the CSV-to-COBRA conversion tool. | 24 Parse command-line arguments for the CSV-to-COBRA conversion tool. |
| 39 | 45 |
| 40 | 46 |
| 41 parser.add_argument("--output", type=str, required=True, | 47 parser.add_argument("--output", type=str, required=True, |
| 42 help="Output model file path") | 48 help="Output model file path") |
| 43 | 49 |
| 44 parser.add_argument("--tool_dir", type=str, default=os.path.dirname(__file__), | 50 parser.add_argument("--tool_dir", type=str, default=os.path.dirname(os.path.abspath(__file__)), |
| 45 help="Tool directory (passed from Galaxy as $__tool_directory__)") | 51 help="Tool directory (default: auto-detected package location)") |
| 46 | 52 |
| 47 | 53 |
| 48 return parser.parse_args(args) | 54 return parser.parse_args(args) |
| 49 | 55 |
| 50 | 56 |
