class Bio::FANTOM::MaXML::Sequence
Constants
Private Class Methods
define_id_method(array)
click to toggle source
# File lib/bio/db/fantom.rb 251 def self.define_id_method(array) 252 array.each do |tagstr| 253 module_eval(" 254 def #{tagstr} 255 unless defined?(@#{tagstr}) 256 @#{tagstr} = gsub_entities(@elem.text('#{tagstr}')) 257 @#{tagstr} = altid('#{tagstr}') unless @#{tagstr} 258 end 259 @#{tagstr} 260 end 261 ") 262 end 263 end
Public Instance Methods
altid(t = nil)
click to toggle source
# File lib/bio/db/fantom.rb 219 def altid(t = nil) 220 unless defined?(@altid) 221 @altid = {} 222 @elem.each_element('altid') do |e| 223 @altid[e.attributes['type']] = gsub_entities(e.text) 224 end 225 end 226 if t then 227 @altid[t] 228 else 229 @altid 230 end 231 end
annotations()
click to toggle source
# File lib/bio/db/fantom.rb 241 def annotations 242 unless defined?(@annotations) 243 @annotations = 244 MaXML::Annotations.new(@elem.elements['annotations']) 245 end 246 @annotations 247 end
id_strings()
click to toggle source
# File lib/bio/db/fantom.rb 233 def id_strings 234 altid.values.sort.uniq 235 end
library_id()
click to toggle source
# File lib/bio/db/fantom.rb 237 def library_id 238 entry_id[0,2] 239 end