class Bio::FANTOM::MaXML::Sequence

Constants

Data_XPath

(MaXML sequence) fantom2.gsc.riken.go.jp/fantom/2.1/allseq.sep.xml.gz fantom2.gsc.riken.go.jp/fantom/2.1/repseq.sep.xml.gz

Private Class Methods

define_id_method(array) click to toggle source
# File lib/bio/db/fantom.rb, line 251
def self.define_id_method(array)
  array.each do |tagstr|
    module_eval("
      def #{tagstr}
        unless defined?(@#{tagstr})
          @#{tagstr} = gsub_entities(@elem.text('#{tagstr}'))
          @#{tagstr} = altid('#{tagstr}') unless @#{tagstr}
        end
        @#{tagstr}
      end
    ")
  end
end

Public Instance Methods

altid(t = nil) click to toggle source
# File lib/bio/db/fantom.rb, line 219
def altid(t = nil)
  unless defined?(@altid)
    @altid = {}
    @elem.each_element('altid') do |e|
      @altid[e.attributes['type']] = gsub_entities(e.text)
    end
  end
  if t then
    @altid[t]
  else
    @altid
  end
end
annotations() click to toggle source
# File lib/bio/db/fantom.rb, line 241
def annotations
  unless defined?(@annotations)
    @annotations =
      MaXML::Annotations.new(@elem.elements['annotations'])
  end
  @annotations
end
id_strings() click to toggle source
# File lib/bio/db/fantom.rb, line 233
def id_strings
  altid.values.sort.uniq
end
library_id() click to toggle source
# File lib/bio/db/fantom.rb, line 237
def library_id
  entry_id[0,2]
end