Querying the Pathway Commons API returns empty string

24 views
Skip to first unread message

Abel Jansma

unread,
May 17, 2021, 3:58:56 AM5/17/21
to pathway-commons-help

Hi, I'm trying to get the Pathway Common API to return all interactions between a set of genes. I came across some situations where the API returns an empty string, but the website shows an interactions. Specifically, calling for all paths of length 1 between ID2 and TCF4:

https://www.pathwaycommons.org/pc2/graph?source=ID2&source=TCF4&organism=9606&kind=PATHSBETWEEN&format=SIF

returns an empty string, even though these two genes are interacting in the database, as seen here:

https://apps.pathwaycommons.org/interactions?source=TCF4%2CID2

This is only the case for some pairs. JUN and FOS for example work fine:

https://www.pathwaycommons.org/pc2/graph?source=FOS&source=JUN&organism=9606&kind=PATHSBETWEEN&format=SIF

Does anyone know what is going on? Is the API querying an old version of the database? Are my queries incorrect?

Abel Jansma

unread,
May 17, 2021, 4:08:30 AM5/17/21
to pathway-commons-help
Also: the file PathwayCommons11.All.hgnc.sif.gz at https://www.pathwaycommons.org/archives/PC2/v11/ *does* contain the interaction "ID2 interacts-with TCF4". So it seems like either my query or the API are wrong. 

Igo -

unread,
May 17, 2021, 11:06:23 AM5/17/21
to pathway-co...@googlegroups.com
Hi Abel,

The latest (and final) PC2 web services release was v12, https://academic.oup.com/nar/article/48/D1/D489/5606621, which uses (and was build on) https://www.pathwaycommons.org/archives/PC2/v12/ data, but this is likely not the issue here anyway (though, why do you call the v12 service but compare with the v11 data files?..)

So, I think that the web query returns empty result due to PATHSBETWEEN type of the query is a special BioPAX graph query, perhaps not what you'd expect (the path must exists between the source BioPAX entities, i.e., some Interaction type objects I guess.. whereas "interacts-with" SIF type, such as "ID2 interacts-with TCF4",  simply means these are among the participants of the same MolecularInteraction (BioPAX type; usually, is the result of converting a PSI-MI interactions, such as from HPRD or IntAct, to BioPAX L3). You can read more about the graph queries in the Paxtools paper,  https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003194; see also about the SIF inference "rules": http://www.pathwaycommons.org/pc2/formats#sif_relations.

The following PC2 BioPAX graph queries, however, returns some data: 
and does contain the "ID2 interacts-with TCF4"  entry

However, if you use the "organism=9606" filter, you won't find that interaction in the result, because likely the organism wasn't specified in the source data and we could not auto-complete during the data integration process for some reason (e.g., not unique mapping, etc.). PC2 v12 was to include only human bio pathway data (other species, some data but not much, came from original "human" data files and are about human viruses or model organism proteins, etc., not fully annotated for BioPAX, being uneasy to remove or call that as "9606", etc.)

Hope it helps.

--
You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/9737471a-2d15-4a99-adc1-ac21e4a2ffe2n%40googlegroups.com.
Message has been deleted

IgorR

unread,
May 17, 2021, 2:09:36 PM5/17/21
to pathway-commons-help
 (Oops again - was distracted :)) :

Oops, the first working example link in my previous message was supposed to be:
https://www.pathwaycommons.org/pc2/graph?source=ID2&source=TCF4&kind=neighborhood&format=SIF (i.e., like the original Abel's one but without "organism=9606" criteria, and with 
NEIGHBORHOOD instead of PATHSBETWEEN for "kind" parameter
)

On Monday, May 17, 2021 at 1:59:18 PM UTC-4 IgorR wrote:
Oops, the first working example link in my previous message was supposed to be:
https://www.pathwaycommons.org/pc2/graph?source=ID2&source=TCF4&kind=neighborhood&format=SIF (i.e., like the original Abel's one but without "organism=9606" criteria)

Abel Jansma

unread,
May 18, 2021, 3:33:13 AM5/18/21
to pathway-commons-help
Hi Igor,

Thanks a lot! 
I got my info from this page and indeed just assumed 'paths-between' was what I needed. Good to know that 'neighborhood' does include the Id2-Tcf4 interaction. (though it turned out to be faster to just download the whole v12 SIF file and work with it locally.) Great resource!

Best,

Abel

Igo -

unread,
May 18, 2021, 10:25:04 AM5/18/21
to pathway-co...@googlegroups.com
Glad to hear that it's useful!

We've also got a web service ro run the SIF graph queries directly, not via the BioPAX model, using one of the output TXT ("extended SIF" PC2 format) data files (currently it's PathwayCommons12.All.hgnc.txt.gz);
see/try:

However, keep in mind that:
  • only one biological ID type per entity kind  is allowed in this case which depends on the PC TXT/SIF file we loaded (currently, it's HGNC for protein/rna/dna/gene and CHEBI for small molecules) ; also, such file is already a much simpler representation of the pathways and interactions knowledge, compared with the full PC2 BioPAX L3 graph;
  • due to the data graphs are quite different, the result of running e.g. "neighborhood" query with the same input IDs with the sifgraph service (TXT file) vs.  "/pc2/graph?kind=...&format=SIF" (BioPAX OWL graph traversal, then converting the result graph to SIF) will be different (both make sense, but it's important to understand where the differences come from)

All the best,

You received this message because you are subscribed to a topic in the Google Groups "pathway-commons-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pathway-commons-help/ncQ3QNVBEc0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pathway-commons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/0efdf4f0-3ec6-4fa0-90a5-d35514fae5e7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages