Class: Bio::DB::Alignment
- Inherits:
-
Object
- Object
- Bio::DB::Alignment
- Defined in:
- lib/bio-cigar/sam.rb
Instance Method Summary collapse
-
#percent_identity(reference_sequence) ⇒ Object
Work out the percent identity given of the query sequence against the reference sequence, using the CIGAR string as the alignment.
Instance Method Details
#percent_identity(reference_sequence) ⇒ Object
Work out the percent identity given of the query sequence against the reference sequence, using the CIGAR string as the alignment
7 8 9 10 11 12 |
# File 'lib/bio-cigar/sam.rb', line 7 def percent_identity(reference_sequence) return Bio::Cigar.new(self.cigar).percent_identity( reference_sequence[self.pos-1...reference_sequence.length], self.seq ) end |