jboilesen / openbel-webtools

OpenBEL is an open source and open community project providing BEL (Biological Expression Language) and a set of tools to process/store biological knowledge. As BEL expressions may become very complex, our project aims to develop a web visualization tool for BEL graph to enhance user's comprehension and interaction, using HTML5 and Javascript libraries.
Apache License 2.0
1 stars 1 forks source link

Store BEL Term function #11

Closed abargnesi closed 10 years ago

abargnesi commented 10 years ago

It might be nice to store the BEL Term function in the nodes table. This will be important for node visualizations (see attached). graph

This can be done with bel.rb easily:

irb(main):001:0> require 'bel'
=> true
irb(main):002:0> p(HGNC['AKT']).fx.long_form
=> :proteinAbundance
irb(main):003:0> p(HGNC['AKT']).fx
=> #<BEL::Language::Function:0x00000000d6d120 @short_form=:p, @long_form=:proteinAbundance, @description="Denotes the abundance of a protein", @return_type=:p, @signatures=[#<BEL::Language::Signature:0x00000000da0f98 @fx=:p, @arguments=[#<BEL::Language::E:0x00000000da1010 @encoding=:P, @var=false>]>, #<BEL::Language::Signature:0x00000000da0bb0 @fx=:p, @arguments=[#<BEL::Language::E:0x00000000da0ca0 @encoding=:P, @var=false>, #<BEL::Language::F:0x00000000da0c28 @func_return=:pmod, @var=false>]>, #<BEL::Language::Signature:0x00000000da0138 @fx=:p, @arguments=[#<BEL::Language::E:0x00000000da0278 @encoding=:P, @var=false>, #<BEL::Language::F:0x00000000da0188 @func_return=:sub, @var=false>]>, #<BEL::Language::Signature:0x00000000d9faa8 @fx=:p, @arguments=[#<BEL::Language::E:0x00000000d9fbc0 @encoding=:P, @var=false>, #<BEL::Language::F:0x00000000d9faf8 @func_return=:fus, @var=false>]>, #<BEL::Language::Signature:0x00000000d9f648 @fx=:p, @arguments=[#<BEL::Language::E:0x00000000d9f6c0 @encoding=:P, @var=false>, #<BEL::Language::F:0x00000000d9f670 @func_return=:trunc, @var=false>]>]>