Module Bio::Alignment::OriginalPrivate
In: lib/bio/alignment.rb

Methods

Public Instance methods

Gets the name or the definition of the sequence from given object.

[Source]

      # File lib/bio/alignment.rb, line 1498
1498:       def extract_key(obj)
1499:         sn = nil
1500:         for m in [ :definition, :entry_id ]
1501:           begin
1502:             sn = obj.send(m)
1503:           rescue NameError, ArgumentError
1504:             sn = nil
1505:           end
1506:           break if sn
1507:         end
1508:         sn
1509:       end

Gets the sequence from given object.

[Source]

      # File lib/bio/alignment.rb, line 1478
1478:       def extract_seq(obj)
1479:         seq = nil
1480:         if obj.is_a?(Bio::Sequence::NA) or obj.is_a?(Bio::Sequence::AA) then
1481:           seq = obj
1482:         else
1483:           for m in [ :seq, :naseq, :aaseq ]
1484:             begin
1485:               seq = obj.send(m)
1486:             rescue NameError, ArgumentError
1487:               seq = nil
1488:             end
1489:             break if seq
1490:           end
1491:           seq = obj unless seq
1492:         end
1493:         seq
1494:       end

[Validate]