module Bio::Alignment::OriginalPrivate
Bio::Alignment::OriginalPrivate
is a set of private methods for Bio::Alignment::OriginalAlignment
.
Public Class Methods
extract_key(obj)
click to toggle source
Gets the name or the definition of the sequence from given object.
# File lib/bio/alignment.rb 1493 def extract_key(obj) 1494 sn = nil 1495 for m in [ :definition, :entry_id ] 1496 begin 1497 sn = obj.send(m) 1498 rescue NameError, ArgumentError 1499 sn = nil 1500 end 1501 break if sn 1502 end 1503 sn 1504 end
extract_seq(obj)
click to toggle source
Gets the sequence from given object.
# File lib/bio/alignment.rb 1478 def extract_seq(obj) 1479 if obj.is_a?(Bio::Sequence::NA) or obj.is_a?(Bio::Sequence::AA) then 1480 obj 1481 else 1482 meth = [ :seq, :naseq, :aaseq ].find {|m| 1483 obj.respond_to? m 1484 } 1485 meth ? 1486 obj.__send__(meth) : 1487 obj 1488 end 1489 end