Skip to content
Snippets Groups Projects
Commit 02f6c415 authored by Vermaat's avatar Vermaat
Browse files

Name as fallback for NomenclatureSymbol in slicing

For example, CLN3 in Dog doesn't have NomenclatureSymbol set, but it
does have Name.
parent 52563fdc
No related branches found
No related tags found
No related merge requests found
......@@ -596,7 +596,10 @@ class GenBankRetriever(Retriever):
gene))
return None
if unicode(document['NomenclatureSymbol']).lower() == gene.lower():
# For the available fields and their meaning, see Table 9 in:
# http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.359.4838&rep=rep1&type=pdf
if gene.lower() in [unicode(document[key]).lower()
for key in ('NomenclatureSymbol', 'Name')]:
# Found it.
if not document['GenomicInfo']:
self._output.addMessage(
......@@ -631,8 +634,8 @@ class GenBankRetriever(Retriever):
# Collect official symbols that has this gene as alias in case we
# can not find anything.
if (gene in unicode(document['OtherAliases']).split(',') and
document['NomenclatureSymbol']):
aliases.append(unicode(document['NomenclatureSymbol']))
(document['NomenclatureSymbol'] or document['Name'])):
aliases.append(unicode(document['NomenclatureSymbol'] or document['Name']))
if not chr_acc_ver:
# We did not find any genes.
......
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