diff COBRAxy/rps_generator.py @ 147:3fca9b568faf draft

Uploaded
author bimib
date Wed, 06 Nov 2024 13:57:24 +0000
parents 41f35c2f0c7b
children
line wrap: on
line diff
--- a/COBRAxy/rps_generator.py	Wed Nov 06 10:12:52 2024 +0000
+++ b/COBRAxy/rps_generator.py	Wed Nov 06 13:57:24 2024 +0000
@@ -16,7 +16,7 @@
 
 ########################## argparse ##########################################
 ARGS :argparse.Namespace
-def process_args() -> argparse.Namespace:
+def process_args(args:List[str] = None) -> argparse.Namespace:
     """
     Processes command-line arguments.
 
@@ -51,7 +51,7 @@
                         required = True,
                         help = 'rps output')
     
-    args = parser.parse_args()
+    args = parser.parse_args(args)
     return args
 
 ############################ dataset name #####################################
@@ -222,7 +222,7 @@
     df.to_csv(ARGS.rps_output, sep = '\t', na_rep = "None", index = False)
 
 ############################ main ####################################
-def main() -> None:
+def main(args:List[str] = None) -> None:
     """
     Initializes everything and sets the program in motion based on the fronted input arguments.
 
@@ -230,7 +230,7 @@
         None
     """
     global ARGS
-    ARGS = process_args()
+    ARGS = process_args(args)
 
     # TODO:use utils functions vvv
     with open(ARGS.tool_dir + '/local/pickle files/black_list.pickle', 'rb') as bl: