Rothamsted / knetminer

KnetMiner - webapp to search and visualize genome-scale knowledge graphs
https://knetminer.com
MIT License
25 stars 16 forks source link

Can't search when the configured dataset has one specie only. #804

Open marco-brandizi opened 11 months ago

marco-brandizi commented 11 months ago

I wrote the addition to run aratiny with a single-specie configuration, this can be enabled via: /aratiny/manual-test/run-ws-single-specie.sh

The problem is the UI doesn't work during this configuration. When I click on 'Search', no matter the provided input, I get this in the browser console:

data-utils.js:79 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at searchKeyword (data-utils.js:79:13)
    at <anonymous>:1:1

Which points to a block in searchKeyword() that tries to get chromosome region input from the UI.

The problem seems to be that the initial region has no value in the "Chromosome" selector.

The API returns this information correctly, via: http://localhost:9090/ws/dataset-info/chromosome-ids?taxId=4565