wikipathways / wikipathways-development

Roadmap planning, developer documentation, contribution guidelines
2 stars 0 forks source link

Insert NDEx urls into frontmatter #58

Closed AlexanderPico closed 2 years ago

AlexanderPico commented 2 years ago

Is the mapping between WPIDs and NDExIDs obtainable? If so, could we store that table in the repo and have a GitHub action that updated an "NDEX-url" field in the frontmatter each time the file was updated?

If we had the NDEx-url in the frontmatter, then I could easily provide a link on the pathway page to NDEx, as well as links to open the pathway in Cytoscape or even run R/Python code with the NDEx content.

ariutta commented 2 years ago

It's possible to get that data, but it takes awhile. I've done it before. The tricky part might be setting up a system for getting an NDEx URL when creating a new pathway.

AlexanderPico commented 2 years ago

Ok. If the source info is not easily accessible, then let's skip this for now. I can talk to NDEx team about providing this info, e.g., as an inventory report or something.

AlexanderPico commented 2 years ago

Via NDEx API:

  1. List network UUIDs by collection. See "WikiPathways Collection - Homo sapiens"

    https://ndexbio.org/v2/user/363f49e0-4cf0-11e9-9f06-0ac135e8bacf/networksets
  2. Get network names per UUID as batch POST query

    https://ndexbio.org/v2/batch/network/summary?accesskey={accessKey}
  3. Parse network summaries: networkAttributes:wikipathwaysID

AlexanderPico commented 2 years ago

Works! https://github.com/wikipathways/wikipathways-database/blob/main/.github/workflows/on_ndex_change.yml