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



147
148
149
150
# File 'lib/bio/db/fantom.rb', line 147

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

#representative_cloneidObject



152
153
154
155
# File 'lib/bio/db/fantom.rb', line 152

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

#representative_seqidObject



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

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



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

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



133
134
135
# File 'lib/bio/db/fantom.rb', line 133

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

#sequencesObject



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

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