Class | Bio::FANTOM::MaXML::Annotations
In: | lib/bio/db/fantom.rb
Parent: | MaXML

### Methods

[] cds_start cds_stop data_source each evidence gene_name get_all_by_qualifier get_by_qualifier to_a

### Included Modules

Enumerable

### Constants

Data_XPath | = | nil

### Public Instance methods

[](*arg)

[Source]

         # File lib/bio/db/fantom.rb, line 302
    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()

[Source]

         # File lib/bio/db/fantom.rb, line 310
    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()

[Source]

         # File lib/bio/db/fantom.rb, line 318
    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()

[Source]

         # File lib/bio/db/fantom.rb, line 334
    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| ...}

[Source]

         # File lib/bio/db/fantom.rb, line 273
    273:         def each
    274:           to_a.each { |x| yield x }
    275:         end

evidence()

[Source]

         # File lib/bio/db/fantom.rb, line 342
    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()

[Source]

         # File lib/bio/db/fantom.rb, line 326
    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)

[Source]

         # File lib/bio/db/fantom.rb, line 285
    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)

[Source]

         # File lib/bio/db/fantom.rb, line 297
    297:         def get_by_qualifier(qstr)
    298:           a = get_all_by_qualifier(qstr)
    299:           a ? a[0] : nil
    300:         end

to_a()

[Source]

         # File lib/bio/db/fantom.rb, line 277
    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

[Validate]