Closed JM-Mendez closed 4 years ago
Hi @JM-Mendez, from the issue:
In this query:
`
`
You see that in the two constraints, you have the same code (N). Can you try to change that to A for the first one and B for the second one and see if the query works? If I remember correctly, it's required to add an unique code to each constraints (A,B,C,D,E...).
Hi @AdrianBZG and @Nikhil-Vats, I've managed to add multiple list constraints, thanks to @AdrianBZG's suggestion above. I don't know enough about the charts to know if it's properly filtering according to those constraints, so I'd need someone to verify that.
Also, I started the list constraint codes at letter "N", because I noticed that window.organismFilterLetters
codes ran through the letter "J", while GO Annotation
, Dataset Name
, and Pathway Name
used letters "K"-"M" respectively.
Hi @JM-Mendez ,
I've taken a look at this, and it looks like it's performing an AND constraint over the selected lists. Basically it's filtering for those genes that appear in common across all the lists you select. I think it would be beter if it's a OR constraint, basically filter for those genes appearing in any of the selected lists.
You can do this by adding OR between the constraints codes, like A OR B OR C OR D ...
@AdrianBZG so I think I've tracked down the root cause of not being able to add multiple lists. I used this query builder and it seems that it does not handle more constraint codes than A-Z, even though the api docs state it only expects a string.
Currently every letter except N
is being used for other filters, like Go annotations, or organisms—therefore the only available slot for a list is N
.
I could dynamically create the window.tableConstraintLogic
string, but this requires deciding which of the other filters to leave out. Or maybe even decide a priority level for adding filters.
So if you'd like me to create the list dynamically, I'd need some guidance on the filtering logic you'd like to use. Otherwise I'm not sure if we could add this feature.
As a follow up, I just realized that there are only 7 (A-G
) organism types in the human mine, while the constraint codes allow for 10 (A-J
). So maybe we could use the other 3 slots and allow up to 4 different lists to be used.
Description
This PR attempts to resolve #32, which would allow the user to select multiple lists from the Gene/Protein intermine lists.
I've managed to add multiple lists to the query using
window.imTable.query.addConstraints
which allows me to pass in an array of contraints.I stepped through the debugger and for the most part it returns a result from the server, until it tries to parse the xml. Then I run into the error below. I truncated the
view
andconstraintLogic
so the code fits without scrolling.Yet when I try running the query on the humanMine website, I get this xml structure:
This seems well formatted to me, so I'm at a loss as to what the error means.
The stack trace throws inside the
es6-promise
package used byimTables
. The last method called that belongs to theimTables
library isService.prototype.authorise
(I'm tracing through the compiled package).I have no idea where to go from here. Any thoughts?
Related issues and discussion
32
Screenshots, if any
Stack trace:
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!