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

Internal Server Error 500 #48

Open
karafecho opened this issue Dec 17, 2019 · 19 comments
Open

Internal Server Error 500 #48

karafecho opened this issue Dec 17, 2019 · 19 comments

Comments

@karafecho
Copy link
Collaborator

image

@mmersmann
Copy link
Collaborator

@karafecho Can you paste in the query text that produced this issue?

@karafecho
Copy link
Collaborator Author

The query is behind the error box and described within that box.

Essentially, I'm having lots of transition issues with transitions that use to work. May be related to BioLink. In the example here, the transition issue produced an internal server error. Steve asked Yaphet and Chuck to investigate.

@YaphetKG
Copy link
Collaborator

We were running a query something of this nature

SELECT population_of_individual_organisms->disease
         FROM "/clinical/cohort/disease_to_chemical_exposure"
        WHERE icees.table = 'patient'
          AND icees.year = 2010
          AND icees.feature.EstResidentialDensity = 1 
         AND icees.maximum_p_value = 1

and this returned a value , I think icees expects icees.feature to be set

@YaphetKG
Copy link
Collaborator

SELECT population_of_individual_organisms->disease->gene
         FROM "/schema"
        WHERE icees.table = 'patient'
          AND icees.year = 2010
          AND icees.feature.EstResidentialDensity = 1 
         AND icees.maximum_p_value = 1

And also this has response coming from robokop, maybe icees.feature is a required parameter

@YaphetKG
Copy link
Collaborator

this is a response segment from Icees

  "response": {
    "version": "2.0.0",
    "return value": {
      "code_description": "'feature'",
      "datetime": "2019-12-12/18/19 20:41:41",
      "message_code": "Error",
      "reasoner_id": "ICEES",
      "tool_version": "2.0.0"
    },

Returned when running a machine question

 {
  "query_options": {
    "table": "patient",
    "year": 2010,
    "maximum_p_value": 1
  },
  "machine_question": {
    "edges": [
      {
        "id": "e1",
        "source_id": "population_of_individual_organisms",
        "target_id": "disease",
        "type": "association"
      }
    ],
    "nodes": [
      {
        "id": "population_of_individual_organisms",
        "type": "population_of_individual_organisms"
      },
      {
        "id": "disease",
        "type": "disease"
      }
    ]
  }
}

@stevencox
Copy link
Collaborator

@karafecho - we can't see the full text of the query. Could you paste the text here?

@karafecho
Copy link
Collaborator Author

I think I ran the query below:

select population_of_individual_organisms->disease
from "/schema"
where icees.table="patient"
and icees.year="2010"
and icees.cohort_feature={}
and icees.maximum_p_value=1
AND disease !=~ '^(SCTID.|MONDO.| umlscui.*)$'

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 18, 2019

I ran a number of variations of the same general query. All failed. I think Yaphet may be correct that icees.feature is a required parameter. Unlike this example, some required a transition to ROBOKOP.

@karafecho
Copy link
Collaborator Author

Also, I think the FROM clause has changed and needs to be specified more precisely.

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 18, 2019

This query runs but does not transition to ROBOKOP via the FROM clause "disease_to_chemical_exposure":

SELECT population_of_individual_organisms->disease
FROM "/clinical/cohort/disease_to_chemical_exposure"
WHERE icees.table = 'patient'
AND icees.year = 2010
AND icees.feature.Sex2 = 'Male'
AND icees.maximum_p_value = 1

This query does not run:

SELECT population_of_individual_organisms->disease->chemical_substance
FROM "/clinical/cohort/disease_to_chemical_exposure"
WHERE icees.table = 'patient'
AND icees.year = 2010
AND icees.feature.Sex2 = 'Male'
AND icees.maximum_p_value = 1

Neither does this one:

SELECT population_of_individual_organisms->disease->chemical_exposure
FROM "/clinical/cohort/disease_to_chemical_exposure"
WHERE icees.table = 'patient'
AND icees.year = 2010
AND icees.feature.Sex2 = 'Male'
AND icees.maximum_p_value = 1

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 18, 2019

This query appears to get to ROBOKOP via disease->gene->biological_process_or_activity, but then breaks down.

SELECT population_of_individual_organisms->disease->gene->biological_process_or_activity->gene->chemical_substance
FROM "/clinical/cohort/disease_to_chemical_exposure"
WHERE icees.table = 'patient'
AND icees.year = 2010
AND icees.feature.Sex2 = 'Male'
AND icees.maximum_p_value = 1

image

Is "chemical_substance" the correct node name, or should this be "drug"? ROBOKOP's list of operations is a bit unclear.

@YaphetKG
Copy link
Collaborator

I think robokop does have gene-> biological_process_or_activity but not biological_process_or_activity -> gene,

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 19, 2019

Thanks. The transition was available at one point, I thought. Is this list of ROBOKOP operations up to date? I would think that it would be, given the recent NCATS request for testing and documentation, but I'm not certain that it is, or perhaps I'm misreading a few of the operations. Shall I post this question to the ROBOKOP team?

Also, I'd like to better understand the structure of the FROM clause in TranQL, as this appears to have changed.

@YaphetKG : Perhaps we can touch base to discuss the issues I've posted? That way, I could run a few queries and show you the full set of error messages.

@stevencox
Copy link
Collaborator

When typing a query, pressing Ctrl-Space after an arrow shows the valid BioLink-Model concepts.

So the valid transitions from gene are:

image

And valid ones from biological_process_or_activity:

image

It also works for predicates:

image

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 20, 2019

This TranqL example query (WF5, from "Help and Information - Examples") does not run:

image

@karafecho
Copy link
Collaborator Author

image

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 20, 2019

Thanks for the tip, @scox@renci.org re "When typing a query, pressing Ctrl-Space after an arrow shows the valid BioLink-Model concepts". But, I'm not sure how a user would figure that out. Plus, the BioLink data model is evolving, which makes R&D challenging.

For instance, we structured TranQL queries for Tanslator Workflows 4 and 5 to comply with the BioLink data model, Those workflows are no longer relevant to this project, but it would be helpful for users to have a few working examples.

@YaphetKG
Copy link
Collaborator

@karafecho, Yeah sure, I'll be glad to help mean while I'll try to find what is going on with the example query

@karafecho
Copy link
Collaborator Author

karafecho commented Dec 20, 2019

@stevencox : I met with Yaphet earlier today. Issues were resolved within about five minutes.

One issue was related to the FROM clause. My original query and thinking was correct in that it should be set to "/schema" for execution of query planning.

A second issue was related to an incorrect constraint in the example query. This still needs to get corrected in the Workflow 5 v3 example query documentation.

A third issue was related to an ICEES constraint and a specific feature variable. This is an issue I was aware of, but simply forgot until I met with Yaphet.

A fourth issue was related to my misinterpretation of the ROBOKOP operations documentation. Specifically, I didn't realize that the use of "to" in a natural language operation did not necessarily imply directionality. The Ctrl + Space feature in TranQL should solve that problem.

So, all is fine (for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants