Class: Bio::Jaspar::Record

Inherits:
Array
  • Object
show all
Defined in:
lib/bio-jaspar/jaspar.rb

Overview

Attributes

  • version - The JASPAR version used

Instance Method Summary collapse

Constructor Details

#initializeRecord

Construct a record instance



165
166
167
168
# File 'lib/bio-jaspar/jaspar.rb', line 165

def initialize
	super()
	@version = nil
end

Instance Method Details

#to_hObject

Return the list of matrices as a hash (ruby equivalent of dict) of matrices



177
178
179
180
181
182
183
# File 'lib/bio-jaspar/jaspar.rb', line 177

def to_h
	dic = {}
	self.each { |motif|
		dic[motif.matrix_id] = motif
	}
	return dic
end

#to_sObject

Return a string of all JASPAR motifs in the list



171
172
173
# File 'lib/bio-jaspar/jaspar.rb', line 171

def to_s
	return self.map { |the_motif| the_motif.to_s }.join("\n")
end