Class: Rbfam::Rna

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/rbfam/rna.rb

Instance Method Summary collapse

Instance Method Details

#_idObject



37
38
39
# File 'lib/rbfam/rna.rb', line 37

def _id
  ("%s %s %s" % [accession, from, to]).gsub(/\W+/, "_")
end

#gapped_sequenceObject



33
34
35
# File 'lib/rbfam/rna.rb', line 33

def gapped_sequence
 as_bioseq(read_attribute(:gapped_sequence))
end

#minus_strand?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rbfam/rna.rb', line 17

def minus_strand?
  !plus_strand?
end

#plus_strand?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/rbfam/rna.rb', line 13

def plus_strand?
  to > from
end

#seq_fromObject



21
22
23
# File 'lib/rbfam/rna.rb', line 21

def seq_from
  [from, to].min
end

#seq_toObject



25
26
27
# File 'lib/rbfam/rna.rb', line 25

def seq_to
  [from, to].max
end

#strandObject



9
10
11
# File 'lib/rbfam/rna.rb', line 9

def strand
  plus_strand? ? :plus : :minus
end