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

DSL works just fine, equivalent JSON errors out #1227

Open
dkoslicki opened this issue Feb 3, 2021 · 5 comments
Open

DSL works just fine, equivalent JSON errors out #1227

dkoslicki opened this issue Feb 3, 2021 · 5 comments
Assignees
Labels

Comments

@dkoslicki
Copy link
Member

This DSL works:

add_qnode(name=methyltransferase, key=n0)
add_qnode(key=n1)
add_qnode(name=plant, key=n3)
add_qedge(key=e0,subject=n0,object=n1,predicate=biolink:subclass_of)
add_qnode(key=n2)
add_qedge(key=e1,subject=n1,object=n2)
add_qedge(key=e2,subject=n2,object=n3)
expand(kp=ARAX/KG2)
resultify()
filter_results(action=limit_number_of_results,max_results=200,prune_kg=true)

copying the accompanying DSL:

{
  "nodes": {
    "n0": {
      "id": "UMLS:C0025831",
      "is_set": false
    },
    "n1": {
      "is_set": false
    },
    "n3": {
      "id": "UMLS_STY:T002",
      "is_set": false
    },
    "n2": {
      "is_set": false
    }
  },
  "edges": {
    "e0": {
      "predicate": "biolink:subclass_of",
      "subject": "n0",
      "object": "n1",
      "exclude": false
    },
    "e1": {
      "subject": "n1",
      "object": "n2",
      "exclude": false
    },
    "e2": {
      "subject": "n2",
      "object": "n3",
      "exclude": false
    }
  }
}

gives the error:
ERROR: Help, two edges at A583. Don't know what to do: 2

@edeutsch
Copy link
Collaborator

edeutsch commented Feb 3, 2021

Yeah, this is something that I was struggling with yesterday and thought I fixed it but then it threw one test into an infinite loop so I backed out the fix, so yes, this is a bug that I need to resolve. Thanks, will work on it.

@dkoslicki
Copy link
Member Author

And just a note: Trung said it is a font issue, but I'm not 100% sure that's the issue (changing the font didn't fix the problem)

@edeutsch
Copy link
Collaborator

edeutsch commented Feb 5, 2021

My guess is the "font issue" is that sometimes JSON query_graphs pasted into Word or similar tools get their simple ASCII quotation marks converted into fancy forward-facing quotes and backwards facing fancy quotes, and then when that gets pasted into our tool, it causes JSON parsing problems.

But not the A583 problem. I know that problem, but my efforts to rectify it so far have been inadequate. The repro above will help me solve it. Will work on it. next week probably. Thanks!

@dkoslicki
Copy link
Member Author

dkoslicki commented Mar 28, 2021

@edeutsch Is this issue still relevant? I.e. should it be left open?

@edeutsch
Copy link
Collaborator

yes very much relevant. I need to tackle this.

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

No branches or pull requests

2 participants