~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/SearchIO/CigarString.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*- Test Harness script for Bioperl
 
2
# $Id: CigarString.t 15112 2008-12-08 18:12:38Z sendu $
 
3
 
 
4
 
 
5
use strict;
 
6
 
 
7
BEGIN {
 
8
    use lib '.';
 
9
        use Bio::Root::Test;
 
10
        
 
11
        test_begin(-tests => 4);
 
12
    
 
13
        use_ok('Bio::SearchIO');
 
14
}
 
15
 
 
16
my $searchio = Bio::SearchIO->new(
 
17
         -format => 'blast',
 
18
    -file => test_input_file('blast.report')
 
19
);
 
20
 
 
21
my @hsps = ();
 
22
while(my $result = $searchio->next_result){
 
23
    while(my $hit = $result->next_hit){
 
24
        while(my $hsp = $hit->next_hsp){
 
25
            push @hsps, $hsp;
 
26
        }
 
27
    }
 
28
}
 
29
 
 
30
my $first_hsp = shift @hsps;
 
31
my $first_hsp_cigar_string = '504M'; 
 
32
is $first_hsp->cigar_string, $first_hsp_cigar_string;
 
33
is $first_hsp->cigar_string, $first_hsp_cigar_string; # fetch from hash
 
34
 
 
35
my $second_hsp = $hsps[0];
 
36
my $second_hsp_cigar_string = '29M18I22M11I20MD33M4I22M3I25M5I21MI33MD14M';
 
37
is $second_hsp->cigar_string, $second_hsp_cigar_string;