getting list of reactions by element id doesn't work for big set
I am having some problems with retrieving reactions in the exploration plugin. Specifically for SNCA. What I am doing is, that I retrieve ids of elements from a query, then finding their neighbors using project.data.getReactionsWithElement(queryArray). For example for TFEB (on https://pdmap.uni.lu/minerva/) this works and results in the following API calls:
https://pdmap.uni.lu/minerva//api//projects/pd_map_spring_18/models/*/bioEntities:search?count=150&perfectMatch=true&query=TFEB&
https://pdmap.uni.lu/minerva//api//projects/pd_map_spring_18/models/4829/bioEntities/reactions/?participantId=445922,445954,445976,446259,446300,447105,447816,447903,448261,448444,448701,448734,449320&
which returns 12 reactions which is correct.
But for SNCA, I see:
https://pdmap.uni.lu/minerva//api//projects/pd_map_spring_18/models/*/bioEntities:search?count=150&perfectMatch=true&query=SNCA&
https://pdmap.uni.lu/minerva//api//projects/pd_map_spring_18/models/4834/bioEntities/reactions/?participantId=449644,449672,449728,449875,450059,450105,450306,450358&
https://pdmap.uni.lu/minerva//api//projects/pd_map_spring_18/models/4829/bioEntities/reactions/
I debugged the code and there seems to be some sort of problems in function getReactionsForElements(elementIdentifiers, customMap). Th elementIdentifiers has 114 elements which is right
..................OK, forget it :) I tracked the error:
return self.sendPostRequest(self.getReactionsUrl(queryParams), filterParams);
this should be changed to
return self.sendPostRequest(self.getReactionsUrl(queryParams, filterParams));
The filterParams were then not passed to the post request and that caused that all reactions were retrieved.
Please, let me know when you fix this. Without it, the exploration plugin does not work for SNCA on the main pdmap.
reported by @david.hoksza