Class: Bio::FANTOM::MaXML::Sequence

Inherits:
Bio::FANTOM::MaXML show all
Defined in:
lib/bio/db/fantom.rb

Overview

class MaXML::Sequences

Constant Summary collapse

Data_XPath =
'maxml-sequences/sequence'

Constants inherited from Bio::FANTOM::MaXML

DELIMITER

Instance Attribute Summary

Attributes inherited from Bio::FANTOM::MaXML

#elem

Instance Method Summary collapse

Methods inherited from Bio::FANTOM::MaXML

#entry_id, #gsub_entities, #initialize, #to_s

Methods inherited from DB

#entry_id, #exists?, #fetch, #get, open, #tags

Constructor Details

This class inherits a constructor from Bio::FANTOM::MaXML

Instance Method Details

#altid(t = nil) ⇒ Object



219
220
221
222
223
224
225
226
227
228
229
230
231
# 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

#annotationsObject



241
242
243
244
245
246
247
# File 'lib/bio/db/fantom.rb', line 241

def annotations
  unless defined?(@annotations)
    @annotations =
      MaXML::Annotations.new(@elem.elements['annotations'])
  end
  @annotations
end

#id_stringsObject



233
234
235
# File 'lib/bio/db/fantom.rb', line 233

def id_strings
  altid.values.sort.uniq
end

#library_idObject



237
238
239
# File 'lib/bio/db/fantom.rb', line 237

def library_id
  entry_id[0,2]
end