From d4bc9cba5df9bdf13e9f4ceacfd4146dc4d6e721 Mon Sep 17 00:00:00 2001 From: Dominik R Laetsch Date: Mon, 13 Mar 2017 13:14:16 +0000 Subject: [PATCH] Feature - Improved Error message for proteins in clustering from undeclared proteomes in SpeciesClassification file --- kinfin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kinfin.py b/kinfin.py index 57c6e75..66798bd 100755 --- a/kinfin.py +++ b/kinfin.py @@ -1900,8 +1900,8 @@ def __init__(self, cluster_id, protein_ids): self.protein_count = len(protein_ids) try: self.proteomes_by_protein_id = {protein_id : proteinCollection.proteinObjs_by_protein_id[protein_id].proteome_id for protein_id in protein_ids} - except KeyError: - sys.exit("[ERROR] - Proteins in clustering belong to proteomes that are not present in the SpeciesClassification-file. Please add those proteoemes or recluster by omitting these proteomes.") + except KeyError as e: + sys.exit("[ERROR] - Protein %s in clustering belong to proteomes that are not present in the SpeciesClassification-file. Please add those proteoemes or recluster by omitting these proteomes." % (e.args[0])) self.proteome_ids_list = self.proteomes_by_protein_id.values() self.protein_count_by_proteome_id = Counter(self.proteome_ids_list)