Commit 77c3a559 authored by Vermaat's avatar Vermaat
Browse files

Better error message if no gene is specified

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@499 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 3526f7f3
......@@ -1375,10 +1375,14 @@ def process_variant(mutator, description, record, output):
if gene_symbol in genes:
# We found our gene.
gene = record.record.findGene(gene_symbol)
elif (len(genes) == 1) and not(gene_symbol):
# No gene given and there is only one gene in the record.
# Todo: message?
gene = record.record.geneList[0]
elif not gene_symbol:
if len(genes) == 1:
# No gene given and there is only one gene in the record.
# Todo: message?
gene = record.record.geneList[0]
else:
output.addMessage(__file__, 4, "EINVALIDGENE",
"No gene specified. Please choose from: %s" % ", ".join(genes))
else:
output.addMessage(__file__, 4, "EINVALIDGENE",
"Gene %s not found. Please choose from: %s" % (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment