Skip to content

Instantly share code, notes, and snippets.

@abargnesi
Last active September 30, 2015 15:29
Show Gist options
  • Select an option

  • Save abargnesi/ee758c82dbb72443a518 to your computer and use it in GitHub Desktop.

Select an option

Save abargnesi/ee758c82dbb72443a518 to your computer and use it in GitHub Desktop.

Description

This endpoint provides a decomposition of BEL Statement into its constituents (i.e. subject, relationship, object, term, fx, arguments, parameter, ns, value). The short form BEL Statement is also returned under the property statement_short_form.

Request

URL: http://next.belframework.org/api/expressions/{BEL}/components

BEL URI path: Can either be a BEL Term or Statement.

Response

The response will be HTTP 200 with an application/json Content-Type if the BEL expression could be parsed. If the BEL Statement fails to parse an HTTP 404 status is returned.

Examples

protein term without namespace

Response

{
  "expression_components": {
    "subject": {
      "term": {
        "fx": "proteinAbundance",
        "arguments": [
          {
            "parameter": {
              "ns": null,
              "value": "YFG"
            }
          }
        ]
      }
    },
    "relationship": null,
    "object": null
  },
  "statement_short_form": "p(YFG)"
}

causal statement with reaction

Response

{
  "expression_components": {
    "subject": {
      "term": {
        "fx": "reaction",
        "arguments": [
          {
            "term": {
              "fx": "reactants",
              "arguments": [
                {
                  "term": {
                    "fx": "complexAbundance",
                    "arguments": [
                      {
                        "parameter": {
                          "ns": null,
                          "value": "PPAT tetramer"
                        }
                      },
                      {
                        "term": {
                          "fx": "location",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "MESHCS",
                                "value": "Cytoplasm"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "term": {
              "fx": "products",
              "arguments": [
                {
                  "term": {
                    "fx": "complexAbundance",
                    "arguments": [
                      {
                        "parameter": {
                          "ns": null,
                          "value": "PPAT dimer"
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "relationship": "directlyIncreases",
    "object": {
      "term": {
        "fx": "pathology",
        "arguments": [
          {
            "parameter": {
              "ns": "MESHD",
              "value": "Lung Cancer"
            }
          }
        ]
      }
    }
  },
  "statement_short_form": "rxn(reactants(complex(\"PPAT tetramer\",loc(MESHCS:Cytoplasm))),products(complex(\"PPAT dimer\"))) => path(MESHD:\"Lung Cancer\")"
}

Example

protein modification term, long form

Response

{
  "expression_components": {
    "subject": {
      "term": {
        "fx": "proteinAbundance",
        "arguments": [
          {
            "parameter": {
              "ns": "HGNC",
              "value": "YFG"
            }
          },
          {
            "term": {
              "fx": "proteinModification",
              "arguments": [
                {
                  "parameter": {
                    "ns": null,
                    "value": "P"
                  }
                },
                {
                  "parameter": {
                    "ns": null,
                    "value": "S"
                  }
                },
                {
                  "parameter": {
                    "ns": null,
                    "value": "310"
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "relationship": null,
    "object": null
  },
  "statement_short_form": "p(HGNC:YFG,pmod(P,S,310))"
}

Example

big reaction

Response

{
  "expression_components": {
    "subject": {
      "term": {
        "fx": "reaction",
        "arguments": [
          {
            "term": {
              "fx": "reactants",
              "arguments": [
                {
                  "term": {
                    "fx": "abundance",
                    "arguments": [
                      {
                        "parameter": {
                          "ns": "CHEBIID",
                          "value": "18066"
                        }
                      },
                      {
                        "term": {
                          "fx": "location",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "REACTCOMP",
                                "value": "cytosol"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "term": {
                    "fx": "complexAbundance",
                    "arguments": [
                      {
                        "term": {
                          "fx": "abundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "CHEBIID",
                                "value": "18420"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "proteinAbundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "SPID",
                                "value": "P13807"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "proteinAbundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "SPID",
                                "value": "P46976"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "location",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "REACTCOMP",
                                "value": "cytosol"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "term": {
              "fx": "products",
              "arguments": [
                {
                  "term": {
                    "fx": "abundance",
                    "arguments": [
                      {
                        "parameter": {
                          "ns": "CHEBIID",
                          "value": "17659"
                        }
                      },
                      {
                        "term": {
                          "fx": "location",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "REACTCOMP",
                                "value": "cytosol"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                {
                  "term": {
                    "fx": "complexAbundance",
                    "arguments": [
                      {
                        "term": {
                          "fx": "proteinAbundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "SPID",
                                "value": "P46976"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "proteinAbundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "SPID",
                                "value": "P13807"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "abundance",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "CHEBIID",
                                "value": "18420"
                              }
                            },
                            {
                              "term": {
                                "fx": "location",
                                "arguments": [
                                  {
                                    "parameter": {
                                      "ns": "REACTCOMP",
                                      "value": "cytosol"
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      {
                        "term": {
                          "fx": "location",
                          "arguments": [
                            {
                              "parameter": {
                                "ns": "REACTCOMP",
                                "value": "cytosol"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    },
    "relationship": null,
    "object": null
  },
  "statement_short_form": "rxn(reactants(a(CHEBIID:18066,loc(REACTCOMP:cytosol)),complex(a(CHEBIID:18420,loc(REACTCOMP:cytosol)),p(SPID:P13807,loc(REACTCOMP:cytosol)),p(SPID:P46976,loc(REACTCOMP:cytosol)),loc(REACTCOMP:cytosol))),products(a(CHEBIID:17659,loc(REACTCOMP:cytosol)),complex(p(SPID:P46976,loc(REACTCOMP:cytosol)),p(SPID:P13807,loc(REACTCOMP:cytosol)),a(CHEBIID:18420,loc(REACTCOMP:cytosol)),loc(REACTCOMP:cytosol))))"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment