~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to t/Gel.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*-
 
2
## Bioperl Test Harness Script for Modules
 
3
## $Id: Gel.t,v 1.1 2006/01/27 10:52:04 heikki Exp $
 
4
 
 
5
use strict;
 
6
 
 
7
BEGIN { 
 
8
    # to handle systems with no installed Test module
 
9
    # we include the t dir (where a copy of Test.pm is located)
 
10
    # as a fallback
 
11
    eval { require Test; };
 
12
    if( $@ ) {
 
13
        use lib 't';
 
14
    }
 
15
    use Test;
 
16
    plan test => 7 }
 
17
 
 
18
use Bio::PrimarySeq;
 
19
use Bio::Restriction::Analysis;
 
20
use Bio::Tools::Gel;
 
21
ok(1);
 
22
 
 
23
 
 
24
 
 
25
my $seq1 = Bio::PrimarySeq->new(-id=>'groundhog day',
 
26
                                -seq=>'AAAAAAAAAGAATTCTTTTTTTTTTTTTTGAATTCGGGGGGGGGGGGGGGGGGGG');
 
27
 
 
28
 
 
29
my $ra=Bio::Restriction::Analysis->new(-seq=>$seq1);
 
30
ok my @cuts = $ra->fragments('EcoRI'), 3;
 
31
 
 
32
 
 
33
ok my $gel = Bio::Tools::Gel->new(-seq=>\@cuts,-dilate=>10);
 
34
ok my %bands = $gel->bands;
 
35
my @bands = (26, 27, 30);
 
36
my $c = 0;
 
37
foreach my $band (sort {$b <=> $a} keys %bands){
 
38
    #print $band,"\t",  sprintf("%.1f", $bands{$band}), "\n";
 
39
    ok $bands[$c],  sprintf("%.0f", $bands{$band});
 
40
    $c++;
 
41
}
 
42