Skip to content

Commit 2ce6d68

Browse files
author
Dominik R Laetsch
committed
Changed error messages
- now displays more informative error message when wrong file is used for ```--cluster_summary```
1 parent 529e868 commit 2ce6d68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/generate_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Options:
99
-h --help show this
10-
-m, --cluster_summary <FILE> *.cluster_summary.txt file (e.g. TAXON.cluster_summary.txt) from KinFin output
10+
-m, --cluster_summary <FILE> TAXON.cluster_summary.txt file from KinFin output
1111
-c, --config_file <FILE> config.txt used in Kinfin analysis
1212
-o, --out_prefix <STR> Outprefix (default: graph)
1313
--exclude_universal Excludes clusters in which all taxa are present from edge weights (default: False)
@@ -49,12 +49,12 @@ def parse_cluster_stats_f(cluster_stats_f, proteomeObj_by_proteome_id, attribute
4949
#proteome_id_idx = [idx for idx, column in enumerate(temp) if column.replace("_count", "") in proteomeObj_by_proteome_id]
5050
#proteome_id_by_idx = {idx : proteome_id for idx, proteome_id in zip(proteome_id_idx, sorted(proteome_id_fields))}
5151
if not proteome_id_by_idx:
52-
sys.exit("[-] No column header ending in '_count' found in %s" % (",".join(temp)))
52+
sys.exit("[-] No column header ending in '_count' found in %s. Please use TAXON.cluster_summary.txt" % (",".join(temp)))
5353
for idx, col in enumerate(temp):
5454
if col == "attribute_cluster_type":
5555
cluster_type_idx = idx
5656
if not cluster_type_idx:
57-
sys.exit("[-] No column header 'cluster_type' found in %s" % (",".join(temp)))
57+
sys.exit("[-] No column header 'cluster_type' found in %s. Please use TAXON.cluster_summary.txt" % (",".join(temp)))
5858
else:
5959
protein_counts_by_proteome_id = {}
6060
for idx, proteome_id in proteome_id_by_idx.items():

0 commit comments

Comments
 (0)