Module: NCINaturePathway
- Extended by:
- Entity
- Defined in:
- lib/rbbt/sources/NCI.rb
Class Method Summary collapse
- .filter(query, field = nil, options = nil, entity = nil) ⇒ Object
- .gene_index ⇒ Object
- .name_index ⇒ Object
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, = nil, entity = nil) return true if query == entity return true if self.setup(entity.dup, .merge(:format => field)).name.index query false end |
.gene_index ⇒ Object
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_index ⇒ Object
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 |