aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rwxr-xr-xbackend/data/downloadImgsForReview.py2
-rwxr-xr-xbackend/data/genDbpData.py1
-rwxr-xr-xbackend/server.py3
3 files changed, 4 insertions, 2 deletions
diff --git a/backend/data/downloadImgsForReview.py b/backend/data/downloadImgsForReview.py
index d5ccf62..4099584 100755
--- a/backend/data/downloadImgsForReview.py
+++ b/backend/data/downloadImgsForReview.py
@@ -45,7 +45,7 @@ eolIds = eolIds.intersection(imgListIds)
eolIds = sorted(eolIds)
MAX_IMGS_PER_ID = 3
-MAX_THREADS = 10
+MAX_THREADS = 5
numThreads = 0
threadException = None # Used for ending main thread after a non-main thread exception
def downloadImg(url, outFile):
diff --git a/backend/data/genDbpData.py b/backend/data/genDbpData.py
index 6cc8d33..c43ad86 100755
--- a/backend/data/genDbpData.py
+++ b/backend/data/genDbpData.py
@@ -65,6 +65,7 @@ for (name, variants) in nameToVariants.items():
nodeToLabel[name] = variants[0]
for name in nodeToLabel:
del nameToVariants[name]
+nodeToLabel["cellular organisms"] = "organism" # Special case for root node
print("Number of conflicts: {}".format(len(nameToVariants)))
# Try conflict resolution via category-list
# Does a generic-category pass first (avoid stuff like Pan being classified as a horse instead of an ape)
diff --git a/backend/server.py b/backend/server.py
index ba1b60b..0cc03f5 100755
--- a/backend/server.py
+++ b/backend/server.py
@@ -79,7 +79,8 @@ def lookupNodes(names, useReducedTree):
" name IN ({})".format(",".join(["?"] * len(names)))
for row in cur.execute(query, names):
[name, altName] = row
- nodeObjs[name]["commonName"] = altName
+ if altName != name:
+ nodeObjs[name]["commonName"] = altName
#
return nodeObjs
def getNodeImg(name):