class BELParser::Resource::Concept
Attributes
dataset[R]
encodings[R]
identifier[R]
name[R]
synonyms[R]
title[R]
uri[R]
Public Class Methods
new(dataset, uri, pref_label, identifier, title, alt_labels, types)
click to toggle source
# File lib/bel_parser/resource/concept.rb, line 12 def initialize(dataset, uri, pref_label, identifier, title, alt_labels, types) @dataset = dataset @uri = uri @name = pref_label.to_s @identifier = identifier.to_s @title = title.to_s @synonyms = alt_labels.to_s.split('|') @encodings = convert_encoding_types(types.to_s) end
Private Instance Methods
convert_encoding_types(types)
click to toggle source
# File lib/bel_parser/resource/concept.rb, line 26 def convert_encoding_types(types) types.split('|').map do |type| case type when /AbundanceConcept$/ :A when /BiologicalProcessConcept$/ :B when /ComplexConcept$/ :C when /GeneConcept$/ :G when /LocationConcept$/ :L when /MicroRNAConcept$/ :M when /MolecularActivityConcept$/ :T when /PathologyConcept$/ :O when /ProteinConcept$/ :P when /ProteinModificationConcept$/ :E when /RNAConcept$/ :R end end.compact end