PathwayCommons / cpath2

Biological pathway data integration and access platform (Pathway Commons)
http://www.pathwaycommons.org/pc2/
MIT License
6 stars 5 forks source link

filter by datasource in graph queries is case-sensitive #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The filter should not probably be case-sensitive, i.e., both 

/graph?source=AR&kind=neighborhood&datasource=NCI_Nature
/graph?source=AR&kind=neighborhood&datasource=nci_nature

or

/graph?source=AR&kind=neighborhood&datasource=PID
/graph?source=AR&kind=neighborhood&datasource=pid

should work the same.

Interestingly, the filter is case-insensitive (ignores capitalization) in the 
/search and /top_pathways queries.

I bet, that means, the issue is inside the paxtools-query code.

Also, make sure the data provider's names are not lower-cased in the 
/datasources page.

Original issue reported on code.google.com by rod...@gmail.com on 23 Jul 2014 at 3:23

GoogleCodeExporter commented 9 years ago
I am not sure that this is a Paxtools issue. Since Paxtools is not PC specific, 
I think it should be able to differentiate between different capitalizations. 
In an hypothetical case, the user may have different datasource names only 
different in capitalization. If we want to provide a case-insensitive service 
in PC, then PC should convert the parameter to the correct one, and send to 
Paxtools.

Original comment by ozgunba...@gmail.com on 11 Aug 2014 at 2:19

GoogleCodeExporter commented 9 years ago
I am quite sure it is a paxtools-query issue (cpath2 query filters by
datasource or organism are not case-sensitive for the "search" command, but
are sensitive for all graph query commands, and return no result if you
submit a filter value with wrong capitalization, because it in fact
matches/applies somewhere inside the paxtools-query code, unlike the lucene
search in cpath2...)
Igor.

Original comment by rod...@gmail.com on 11 Aug 2014 at 2:25

GoogleCodeExporter commented 9 years ago
I thought, the fix would be simply to replace "equals" with
"equalsIgnoringCase" method somewhere in paxtools-query (perhaps not in one
class)...

PS:
If I had to add a special code to recognize and convert filter values to
actual correct data source or organism names before submitting to the
paxtools' QueryExecuter,
it would be not so easy to do and would fix only for cpath2, but the
QueryExecuter in paxtools in general would still work not good when used
with filters...

Original comment by rod...@gmail.com on 11 Aug 2014 at 2:32

GoogleCodeExporter commented 9 years ago
Well, I can fix this (it's in the paxtools-query, StringFieldFilter, line
#123 and around - the 'validValues' collection there must contain all
values in lower case, and then the 'contains' method call must also turn
its arg to lower case...). Then the filters will be case-insensitive.

Sounds good?

Original comment by rod...@gmail.com on 11 Aug 2014 at 2:44

GoogleCodeExporter commented 9 years ago
Fixed #185 (in paxtools-query).

Original comment by rod...@gmail.com on 11 Aug 2014 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by rod...@gmail.com on 11 Aug 2014 at 8:49