class Bio::FANTOM::MaXML::Annotations
Constants
- Data_XPath
Public Instance Methods
[](*arg)
click to toggle source
# File lib/bio/db/fantom.rb 302 def [](*arg) 303 if arg[0].is_a?(String) and arg.size == 1 then 304 get_by_qualifier(arg[0]) 305 else 306 to_a[*arg] 307 end 308 end
cds_start()
click to toggle source
# File lib/bio/db/fantom.rb 310 def cds_start 311 unless defined?(@cds_start) 312 e = get_by_qualifier('cds_start') 313 @cds_start = e ? e.anntext.to_i : nil 314 end 315 @cds_start 316 end
cds_stop()
click to toggle source
# File lib/bio/db/fantom.rb 318 def cds_stop 319 unless defined?(@cds_stop) 320 e = get_by_qualifier('cds_stop') 321 @cds_stop = e ? e.anntext.to_i : nil 322 end 323 @cds_stop 324 end
data_source()
click to toggle source
# File lib/bio/db/fantom.rb 334 def data_source 335 unless defined?(@data_source) 336 e = get_by_qualifier('gene_name') 337 @data_source = e ? e.datasrc[0] : nil 338 end 339 @data_source 340 end
each() { |x| ... }
click to toggle source
# File lib/bio/db/fantom.rb 273 def each 274 to_a.each { |x| yield x } 275 end
evidence()
click to toggle source
# File lib/bio/db/fantom.rb 342 def evidence 343 unless defined?(@evidence) 344 e = get_by_qualifier('gene_name') 345 @evidence = e ? e.evidence : nil 346 end 347 @evidence 348 end
gene_name()
click to toggle source
# File lib/bio/db/fantom.rb 326 def gene_name 327 unless defined?(@gene_name) 328 e = get_by_qualifier('gene_name') 329 @gene_name = e ? e.anntext : nil 330 end 331 @gene_name 332 end
get_all_by_qualifier(qstr)
click to toggle source
# File lib/bio/db/fantom.rb 285 def get_all_by_qualifier(qstr) 286 unless defined?(@hash) 287 @hash = {} 288 end 289 unless @hash.member?(qstr) then 290 @hash[qstr] = self.find_all do |x| 291 x.qualifier == qstr 292 end 293 end 294 @hash[qstr] 295 end
get_by_qualifier(qstr)
click to toggle source
# File lib/bio/db/fantom.rb 297 def get_by_qualifier(qstr) 298 a = get_all_by_qualifier(qstr) 299 a ? a[0] : nil 300 end
to_a()
click to toggle source
# File lib/bio/db/fantom.rb 277 def to_a 278 unless defined?(@a) 279 @a = @elem.get_elements('annotation') 280 @a.collect! { |e| MaXML::Annotation.new(e) } 281 end 282 @a 283 end