Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support selection from multiple lists #32

Open
LakshSingla opened this issue Feb 14, 2019 · 8 comments
Open

Support selection from multiple lists #32

LakshSingla opened this issue Feb 14, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request good challenge hard difficulty help wanted Extra attention is needed

Comments

@LakshSingla
Copy link
Member

LakshSingla commented Feb 14, 2019

Currently the user can specify only one list from which he or she can view Genes/Proteins etc. The aim of this issue is to enable a user to select from more than one list at a time (much like using "ONE OF" operator).
Here are the caveats:

  • The imjs query interface supports adding only one of the list at a time.
  • Selection from multiple lists can be supported using custom constraintLogic (like A or B where A and B denote the individual list constraints). But imjs query at the moment does not support changing the constraintLogic once it is set. See issue add setConstraintLogic() public method imjs#18
    For a more verbose description, refer to the discussion on PR List constraint logic  #31
@AdrianBZG AdrianBZG added enhancement New feature or request good challenge hard difficulty help wanted Extra attention is needed labels Mar 6, 2020
@JM-Mendez
Copy link

Hi @AdrianBZG, I'm an Outreachy applicant and would love a shot at this issue.

@AdrianBZG
Copy link
Member

Hi @JM-Mendez ,

Great! Let me know if you have any questions, I'll assign this to you 😄

@JM-Mendez
Copy link

Awesome! I'll start getting familiar with the codebase and the linked issues to better understand the requirements, and then get back to you.

Are you the mentor for this issue/project that I need to report to? Not sure how this process works.

@AdrianBZG
Copy link
Member

That sounds like a good way to start. Yes I'm the mentor for this project, so happy to help with any issues.

@JM-Mendez
Copy link

JM-Mendez commented Mar 6, 2020

So I came across 2 issues so far with setting up the project. I'm not familiar with coffeescript, so I just traced my way through the compiled node modules package.


  1. The only test case hangs indefinitely.

I was able to console.log the following error:

TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"

in the https module of imjs. I'm not sure why it wasn't propagated up the promise chain. But changing the protocol to http succeeded.

Yet, the test still hanged. I was only able to trace it as far as the service module authorise method. I'm not entirely sure, but it looks like fetchVersion isn't resolving the promise?

EDIT: Just found this existing issue, so I will disregard this concern.
#71


  1. npm run dev does not work. The script dictates that there should be a webpack config, but I do not see one. I searched the commit history for the file but could not find it in any commit. I also do not see a gulp watch task to run on changes.

I doubt these 2 issues would prevent me from troubleshooting the main issue. Although without webpack or a gulp watch task, I'd have to restart the project on each change.

Would you like me to at the very least open an issue to address issue 2? I have experience setting up a dev environment using webpack and gulp, so can do it either way.

@AdrianBZG
Copy link
Member

AdrianBZG commented Mar 6, 2020

@JM-Mendez It would be very nice if you could set-up the dev environment, and this issue was opened to try to address that: #67.

Happy if you give it a try 😄

After that we can take a look at what happens with the other issue.

@JM-Mendez
Copy link

JM-Mendez commented Mar 10, 2020

EDIT: Crossposted to Draft PR #82 so that I can keep track of my contributions for Outreachy.

Hi @AdrianBZG, 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 and constraintLogic so the code fits without scrolling

"Error: XML is not well formatted. Got 
<query model="genomic" view="Gene.symbol Gene.name..." constraintLogic="(A OR B..." >
  <constraint path="Gene" op="IN" value="PL_BHF_UCL_cardiovascGenes" code="N" />
  <constraint path="Gene" op="IN" value="PL_DiabesityGWAS_pval-4" code="N" />
</query>

Yet when I try running the query on the humanMine website, I get this xml structure:

<query model="genomic" view="Gene.name Gene.symbol..." constraintLogic="A and B">
  <constraint path="Gene" op="IN" value="PL_BHF_UCL_cardiovascGenes" code="B" />
  <constraint path="Gene" op="IN" value="PL_DiabesityGWAS_pval-4" code="A"/>
</query>

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 by imTables. The last method called that belongs to the imTables library is Service.prototype.authorise (I'm tracing through the compiled package).

I have no idea where to go from here. Any thoughts?

Here's a screenshot of the stack trace:
Screen Shot 2020-03-09 at 20 39 05

@AdrianBZG
Copy link
Member

AdrianBZG commented Mar 17, 2020

Hi @JM-Mendez ,

In this query:

<query model="genomic" view="Gene.symbol Gene.name..." constraintLogic="(A OR B..." > <constraint path="Gene" op="IN" value="PL_BHF_UCL_cardiovascGenes" code="N" /> <constraint path="Gene" op="IN" value="PL_DiabesityGWAS_pval-4" code="N" /> </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...).

PS: Let's discuss that in your draft PR.

AdrianBZG pushed a commit that referenced this issue Sep 3, 2020
* Place pie and bar chart in DataViz dir

* Move Table component to DataViz dir

* Move Charts and Table section to DataViz module

* Colocate FormGroups component where it's used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good challenge hard difficulty help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants