COVID-19-Causal-Reasoning / NEU_project

Task_type_classification
1 stars 1 forks source link

Support for CBN parsing #1

Open cthoyt opened 4 years ago

cthoyt commented 4 years ago

Hi, not sure what the issue was with parsing the CBN. I've got another script that I ran a few days ago that converts each CBN graph for Hipathia. Maybe that can inspire you. See:

https://github.com/pybel/pybel/blob/add-hipathia-demo/notebooks/hipathia_demo/cbn/_convert_cbn.py

djinnome commented 4 years ago

Hi @cthoyt

Thanks for the tip! It looks like the trick to using from_cbn_jgif is to read it into a dict instead of trying to read the json directly. What was particularly interesting about the Hypathia code you shared is the pybel.grounding module in the add-hipathia-demo branch, which I am assuming takes a naked gene or compound and maps it to the appropriate namespace. I think this module would be really helpful for the Named Entity Resolution task going on with the CORD-19, but the main branch of pybel doesn't have this module yet. It looks like the current way to ground is demonstrated through the Gilda notebook. Sincerely,

Jeremy

djinnome commented 4 years ago

And thank you, @cthoyt for your interest in our project. As you can see, we are just ramping up, but I would be happy to share with you our plan going forward. Given our 9 hour difference, would you be open to an early evening (early morning for me) call?

cthoyt commented 4 years ago

The grounding stuff is ongoing. Sorry that the branch in question has a couple things in it right now and is misleading. In theory, most stuff in BEL graphs is already grounded to the preferred names from a given namespace, but just needs to be mapped back. That's what the magical ground() function is for! It's crazy that I never built it before, but it became its own tangent that became the PyOBO project that supports it. It will be integrated into the main branch of PyBEL in the next few days.

Anyway, would love to chat. Shoot me a mail at cthoyt@gmail.com for specifics.