diff matchms_networking_wrapper.py @ 5:8147d93d372d draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
author recetox
date Tue, 27 Jun 2023 14:29:16 +0000
parents e4ec3592507f
children 0fd1e5d4ca3c
line wrap: on
line diff
--- a/matchms_networking_wrapper.py	Thu May 25 09:06:20 2023 +0000
+++ b/matchms_networking_wrapper.py	Tue Jun 27 14:29:16 2023 +0000
@@ -8,13 +8,14 @@
 def main(argv):
     parser = argparse.ArgumentParser(description="Create network-graph from similarity scores.")
     parser.add_argument("--graph_format", type=str, help="Format of the output similarity network.")
+    parser.add_argument("--score_name", type=str, help="Name of the score layer to use for creating the network graph.")
     parser.add_argument("--identifier", type=str, help="Unique metadata identifier of each spectrum from which scores are computed.")
     parser.add_argument("--top_n", type=int, help="Number of highest-score edges to keep.")
     parser.add_argument("--max_links", type=int, help="Maximum number of links to add per node.")
     parser.add_argument("--score_cutoff", type=float, help="Minimum similarity score value to link two spectra.")
     parser.add_argument("--link_method", type=str, help="Method for selecting top N edges for each node.")
     parser.add_argument("--keep_unconnected_nodes", help="Keep unconnected nodes in the network.", action="store_true")
-    parser.add_argument("scores", type=str, help="Path to matchMS similarity-scores .json file.")
+    parser.add_argument("scores", type=str, help="Path to matchms similarity-scores .json file.")
     parser.add_argument("output_filename", type=str, help="Path where to store the output similarity network.")
     args = parser.parse_args()
 
@@ -27,7 +28,7 @@
                                 link_method=args.link_method,
                                 keep_unconnected_nodes=args.keep_unconnected_nodes)
 
-    network.create_network(scores)
+    network.create_network(scores, args.score_name)
     network.export_to_file(filename=args.output_filename, graph_format=args.graph_format)
 
     return 0