Module: NCINaturePathway

Extended by:
Entity
Defined in:
lib/rbbt/sources/NCI.rb

Class Method Summary collapse

Class Method Details

.filter(query, field = nil, options = nil, entity = nil) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/rbbt/sources/NCI.rb', line 25

def self.filter(query, field = nil, options = nil, entity = nil)
  return true if query == entity

  return true if self.setup(entity.dup, options.merge(:format => field)).name.index query

  false
end

.gene_indexObject



21
22
23
# File 'lib/rbbt/sources/NCI.rb', line 21

def self.gene_index
  @gene_index ||= NCI.nature_pathways.tsv(:persist => true, :key_field => "NCI Nature Pathway ID", :fields => ["UniProt/SwissProt Accession"], :type => :flat, :merge => true)
end

.name_indexObject



17
18
19
# File 'lib/rbbt/sources/NCI.rb', line 17

def self.name_index
  @name_index ||= NCI.nature_pathways.tsv(:persist => true, :key_field => "NCI Nature Pathway ID", :fields => ["Pathway Name"], :type => :single)
end