Mercurial > repos > recetox > matchms_networking
diff matchms_networking_wrapper.py @ 8:0fd1e5d4ca3c draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 13f4f7af12ec694a5f4ab7b3e52f46a4f67a245e
author | recetox |
---|---|
date | Sun, 19 Nov 2023 14:40:18 +0000 |
parents | 8147d93d372d |
children |
line wrap: on
line diff
--- a/matchms_networking_wrapper.py Thu Oct 19 15:24:54 2023 +0000 +++ b/matchms_networking_wrapper.py Sun Nov 19 14:40:18 2023 +0000 @@ -27,8 +27,11 @@ score_cutoff=args.score_cutoff, link_method=args.link_method, keep_unconnected_nodes=args.keep_unconnected_nodes) + score_name = next((s for s in scores.score_names if args.score_name in s and "score" in s), None) + if score_name is None: + raise ValueError(f"Could not find any score name containing '{args.score_name}'.") - network.create_network(scores, args.score_name) + network.create_network(scores, score_name) network.export_to_file(filename=args.output_filename, graph_format=args.graph_format) return 0