Module: BELParser::Language::Relationship
- Included in:
- Version1_0::Relationships::ActsIn, Version1_0::Relationships::Analogous, Version1_0::Relationships::Association, Version1_0::Relationships::BiomarkerFor, Version1_0::Relationships::CausesNoChange, Version1_0::Relationships::Decreases, Version1_0::Relationships::DirectlyDecreases, Version1_0::Relationships::DirectlyIncreases, Version1_0::Relationships::HasComponent, Version1_0::Relationships::HasComponents, Version1_0::Relationships::HasMember, Version1_0::Relationships::HasMembers, Version1_0::Relationships::HasModification, Version1_0::Relationships::HasProduct, Version1_0::Relationships::HasVariant, Version1_0::Relationships::Includes, Version1_0::Relationships::Increases, Version1_0::Relationships::IsA, Version1_0::Relationships::NegativeCorrelation, Version1_0::Relationships::Orthologous, Version1_0::Relationships::PositiveCorrelation, Version1_0::Relationships::PrognosticBiomarkerFor, Version1_0::Relationships::RateLimitingStepOf, Version1_0::Relationships::ReactantIn, Version1_0::Relationships::SubProcessOf, Version1_0::Relationships::TranscribedTo, Version1_0::Relationships::TranslatedTo, Version1_0::Relationships::Translocates, Version2_0::Relationships::ActsIn, Version2_0::Relationships::Analogous, Version2_0::Relationships::Association, Version2_0::Relationships::BiomarkerFor, Version2_0::Relationships::CausesNoChange, Version2_0::Relationships::Decreases, Version2_0::Relationships::DirectlyDecreases, Version2_0::Relationships::DirectlyIncreases, Version2_0::Relationships::HasComponent, Version2_0::Relationships::HasComponents, Version2_0::Relationships::HasMember, Version2_0::Relationships::HasMembers, Version2_0::Relationships::HasModification, Version2_0::Relationships::HasProduct, Version2_0::Relationships::HasVariant, Version2_0::Relationships::Includes, Version2_0::Relationships::Increases, Version2_0::Relationships::IsA, Version2_0::Relationships::NegativeCorrelation, Version2_0::Relationships::Orthologous, Version2_0::Relationships::PositiveCorrelation, Version2_0::Relationships::PrognosticBiomarkerFor, Version2_0::Relationships::RateLimitingStepOf, Version2_0::Relationships::ReactantIn, Version2_0::Relationships::Regulates, Version2_0::Relationships::SubProcessOf, Version2_0::Relationships::TranscribedTo, Version2_0::Relationships::TranslatedTo, Version2_0::Relationships::Translocates
- Defined in:
- lib/bel_parser/language/relationship.rb
Overview
Relationship allows you to describe the type of BEL Relationship.
BEL Relationships represent an interaction between a subject and object in the BEL expression.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #causal? ⇒ Boolean
- #correlative? ⇒ Boolean
- #decreasing? ⇒ Boolean
-
#deprecated? ⇒ Boolean
Indicates whether this relationship is deprecated.
- #description ⇒ Object
- #direct? ⇒ Boolean
- #directed? ⇒ Boolean
- #genomic? ⇒ Boolean
- #increasing? ⇒ Boolean
- #indirect? ⇒ Boolean
- #injected? ⇒ Boolean
- #listable? ⇒ Boolean
- #long ⇒ Object
- #self? ⇒ Boolean
- #short ⇒ Object
- #to_h(hash = {}) ⇒ Object
- #to_s(form = :short) ⇒ Object
- #to_sym(form = :short) ⇒ Object
Instance Method Details
#==(other) ⇒ Object
72 73 74 75 76 |
# File 'lib/bel_parser/language/relationship.rb', line 72 def ==(other) return true if equal?(other) return false if other.nil? short == other || long == other end |
#causal? ⇒ Boolean
28 29 30 |
# File 'lib/bel_parser/language/relationship.rb', line 28 def causal? false end |
#correlative? ⇒ Boolean
32 33 34 |
# File 'lib/bel_parser/language/relationship.rb', line 32 def correlative? false end |
#decreasing? ⇒ Boolean
36 37 38 |
# File 'lib/bel_parser/language/relationship.rb', line 36 def decreasing? false end |
#deprecated? ⇒ Boolean
Indicates whether this relationship is deprecated. Override in your relationship to mark as deprecated.
24 25 26 |
# File 'lib/bel_parser/language/relationship.rb', line 24 def deprecated? false end |
#description ⇒ Object
16 17 18 |
# File 'lib/bel_parser/language/relationship.rb', line 16 def description raise NotImplementedError, "#{__method__} is not implemented." end |
#direct? ⇒ Boolean
40 41 42 |
# File 'lib/bel_parser/language/relationship.rb', line 40 def direct? false end |
#directed? ⇒ Boolean
44 45 46 |
# File 'lib/bel_parser/language/relationship.rb', line 44 def directed? false end |
#genomic? ⇒ Boolean
48 49 50 |
# File 'lib/bel_parser/language/relationship.rb', line 48 def genomic? false end |
#increasing? ⇒ Boolean
52 53 54 |
# File 'lib/bel_parser/language/relationship.rb', line 52 def increasing? false end |
#indirect? ⇒ Boolean
56 57 58 |
# File 'lib/bel_parser/language/relationship.rb', line 56 def indirect? false end |
#injected? ⇒ Boolean
60 61 62 |
# File 'lib/bel_parser/language/relationship.rb', line 60 def injected? false end |
#listable? ⇒ Boolean
64 65 66 |
# File 'lib/bel_parser/language/relationship.rb', line 64 def listable? false end |
#long ⇒ Object
12 13 14 |
# File 'lib/bel_parser/language/relationship.rb', line 12 def long raise NotImplementedError, "#{__method__} is not implemented." end |
#self? ⇒ Boolean
68 69 70 |
# File 'lib/bel_parser/language/relationship.rb', line 68 def self? false end |
#short ⇒ Object
8 9 10 |
# File 'lib/bel_parser/language/relationship.rb', line 8 def short raise NotImplementedError, "#{__method__} is not implemented." end |
#to_h(hash = {}) ⇒ Object
90 91 92 93 94 95 96 |
# File 'lib/bel_parser/language/relationship.rb', line 90 def to_h(hash = {}) hash.merge!({ 'short' => short, 'long' => long, 'description' => description }) end |
#to_s(form = :short) ⇒ Object
84 85 86 87 88 |
# File 'lib/bel_parser/language/relationship.rb', line 84 def to_s(form = :short) value = _form_value(form) return nil unless value value.to_s end |
#to_sym(form = :short) ⇒ Object
78 79 80 81 82 |
# File 'lib/bel_parser/language/relationship.rb', line 78 def to_sym(form = :short) value = _form_value(form) return nil unless value value.to_s end |