Module: ReactomePathway
- Extended by:
- Entity
- Defined in:
- lib/rbbt/sources/reactome.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
109 110 111 112 113 114 115 |
# File 'lib/rbbt/sources/reactome.rb', line 109 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
105 106 107 |
# File 'lib/rbbt/sources/reactome.rb', line 105 def self.gene_index @gene_index ||= Reactome.protein_pathways.tsv(:persist => true, :key_field => "Reactome Pathway ID", :fields => ["UniProt/SwissProt Accession"], :type => :flat, :merge => true) end |
.name_index ⇒ Object
101 102 103 |
# File 'lib/rbbt/sources/reactome.rb', line 101 def self.name_index @name_index ||= Reactome.pathway_names.tsv(:persist => true, :key_field => "Reactome Pathway ID", :fields => ["Pathway Name"], :type => :single) end |