class Bio::Jaspar::Record
Represent a list of JASPAR motifs.
A direct import of Bio.motifs.jaspar module in Biopython
Attributes¶ ↑
-
version
- The JASPAR version used
Public Class Methods
new()
click to toggle source
Construct a record instance
Calls superclass method
# File lib/bio-jaspar/jaspar.rb, line 165 def initialize super() @version = nil end
Public Instance Methods
to_h()
click to toggle source
Return the list of matrices as a hash (ruby equivalent of dict) of matrices
# File lib/bio-jaspar/jaspar.rb, line 177 def to_h dic = {} self.each { |motif| dic[motif.matrix_id] = motif } return dic end
to_s()
click to toggle source
Return a string of all JASPAR motifs in the list
# File lib/bio-jaspar/jaspar.rb, line 171 def to_s return self.map { |the_motif| the_motif.to_s }.join("\n") end