Skip to content
Snippets Groups Projects
Commit 1cd31294 authored by Vermaat's avatar Vermaat
Browse files

Use more descriptive error messages in position converter (#85)

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@463 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent eb151384
No related branches found
No related tags found
No related merge requests found
...@@ -166,8 +166,8 @@ class Converter(object) : ...@@ -166,8 +166,8 @@ class Converter(object) :
versions = self.__database.get_NM_version(acc) versions = self.__database.get_NM_version(acc)
if not versions : if not versions :
self.__output.addMessage(__file__, 4, "EACCNOTINDB", self.__output.addMessage(__file__, 4, "EACCNOTINDB",
"The accession number: %s could not be " "The accession number %s could not be "
"found in our database." % acc) "found in our database (or is not a transcript)." % acc)
self.__output.addOutput("LOVDERR", self.__output.addOutput("LOVDERR",
"Reference sequence not found.") "Reference sequence not found.")
return None #Explicit return of None in case of error return None #Explicit return of None in case of error
...@@ -182,8 +182,8 @@ class Converter(object) : ...@@ -182,8 +182,8 @@ class Converter(object) :
"Version number missing for %s" % acc) "Version number missing for %s" % acc)
else : else :
self.__output.addMessage(__file__, 4, "EACCNOTINDB", self.__output.addMessage(__file__, 4, "EACCNOTINDB",
"The accession number: %s version %s " "The accession number %s version %s "
"could not be found in our database." % "could not be found in our database (or is not a transcript)." %
(acc, version)) (acc, version))
self.__output.addMessage(__file__, 2, "WDIFFFOUND", self.__output.addMessage(__file__, 2, "WDIFFFOUND",
"We found these versions: %s" % "We found these versions: %s" %
...@@ -510,7 +510,7 @@ class Converter(object) : ...@@ -510,7 +510,7 @@ class Converter(object) :
chrom = self.__database.chromAcc(preco) chrom = self.__database.chromAcc(preco)
if chrom is None : if chrom is None :
self.__output.addMessage(__file__, 4, "ENOTINDB", self.__output.addMessage(__file__, 4, "ENOTINDB",
"Chromosome %s could not be found in our database" % "The accession number %s could not be found in our database (or is not a chromosome)." %
preco) preco)
return None return None
#if #if
...@@ -542,7 +542,7 @@ class Converter(object) : ...@@ -542,7 +542,7 @@ class Converter(object) :
chrom = self.__database.chromName("%s.%s" % (acc, version)) chrom = self.__database.chromName("%s.%s" % (acc, version))
if not chrom : if not chrom :
self.__output.addMessage(__file__, 4, "ENOTINDB", self.__output.addMessage(__file__, 4, "ENOTINDB",
"Accession number: %s could not be found in our database" % "The Accession number %s could not be found in our database (or is not a chromosome)." %
acc) acc)
return None return None
#if #if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment