siibra-python
siibra-python copied to clipboard
Downstream issues after obtaining empty gene expression features
siibra python 1.0a14 triggers downstream problems when querying gene expressions with empty response. siibra will then generate an empty gene expression features, with an empty point list as location, which has an undefined bounding box and amongst other things crashes when trying to print its own location.
I think this needs to be hot-fixed, by 1) refusing to generate empty point lists (could raise an exception), and more importantly 2) not generating empty features.
My suggestion is to raise StopIteration if points_inside is empty after this line in allen.py:
https://github.com/FZJ-INM1-BDA/siibra-python/blob/a27bd8f5ceb8f523a58a2bdfc8aa00d6bacdc96f/siibra/livequeries/allen.py#L139