Class: Bio::FANTOM::MaXML::Cluster

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

Constant Summary collapse

Data_XPath =
'maxml-clusters/cluster'

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

#representative_annotationsObject



145
146
147
148
# File 'lib/bio/db/fantom.rb', line 145

def representative_annotations
  e = representative_sequence
  e ? e.annotations : nil
end

#representative_cloneidObject



150
151
152
153
# File 'lib/bio/db/fantom.rb', line 150

def representative_cloneid
  e = representative_sequence
  e ? e.cloneid : nil
end

#representative_seqidObject



116
117
118
119
120
121
122
# File 'lib/bio/db/fantom.rb', line 116

def representative_seqid
  unless defined?(@representative_seqid)
    @representative_seqid =
      gsub_entities(@elem.text('representative-seqid'))
  end
  @representative_seqid
end

#representative_sequenceObject Also known as: representative_clone



135
136
137
138
139
140
141
142
# File 'lib/bio/db/fantom.rb', line 135

def representative_sequence
  unless defined?(@representative_sequence)
    rid = representative_seqid
 	    @representative_sequence =
      rid ? sequences[representative_seqid] : nil
  end
  @representative_sequence
end

#sequence(idstr = nil) ⇒ Object



131
132
133
# File 'lib/bio/db/fantom.rb', line 131

def sequence(idstr = nil)
  idstr ? sequences[idstr] : representative_sequence
end

#sequencesObject



124
125
126
127
128
129
# File 'lib/bio/db/fantom.rb', line 124

def sequences
  unless defined?(@sequences)
    @sequences = MaXML::Sequences.new(@elem)
  end
  @sequences
end