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

« back to all changes in this revision

Viewing changes to t/LinkageMap.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-*-
2
 
## Bioperl Test Harness Script for Modules
3
 
## $Id: LinkageMap.t,v 1.2 2005/09/16 12:22:36 bosborne Exp $
4
 
#
5
 
 
6
 
use strict;
7
 
 
8
 
BEGIN {
9
 
    use vars qw($DEBUG);
10
 
    $DEBUG = $ENV{'BIOPERLDEBUG'};
11
 
    # to handle systems with no installed Test module
12
 
    # we include the t dir (where a copy of Test.pm is located)
13
 
    # as a fallback
14
 
    eval { require Test; };
15
 
    if( $@ ) {
16
 
        use lib 't';
17
 
    }
18
 
    use Test;
19
 
    plan tests => 16;
20
 
}
21
 
 
22
 
# END {
23
 
# }
24
 
 
25
 
require 'dumpvar.pl';
26
 
 
27
 
use Bio::Map::LinkagePosition;
28
 
use Bio::Map::Microsatellite;
29
 
use Bio::Map::LinkageMap;
30
 
 
31
 
ok 1 ;
32
 
my $verbose = 0;
33
 
ok my $map = new Bio::Map::LinkageMap('-verbose' => $verbose,
34
 
                                   '-name'    => 'Leviathon',
35
 
                                   '-type'    => 'Genetic',
36
 
                                   '-units'   => 'cM',
37
 
                                   '-species' => "Brassica");
38
 
ok ref($map), 'Bio::Map::LinkageMap';
39
 
ok $map->name, 'Leviathon';
40
 
ok $map->type, 'Genetic';
41
 
ok $map->units, 'cM';
42
 
ok $map->species, 'Brassica';
43
 
ok $map->unique_id, '1';
44
 
 
45
 
ok my $position = new Bio::Map::LinkagePosition('-order' => 2,
46
 
                                                '-map' =>  $map, 
47
 
                                                '-value' => 22.3
48
 
                                                );
49
 
 
50
 
ok $position->order, 2;
51
 
ok $position->map, $map,
52
 
ok $position->value, 22.3;
53
 
 
54
 
ok my $o_usat = new Bio::Map::Microsatellite('-name'     => "Chad marker",
55
 
                                             '-position' => $position);
56
 
 
57
 
ok $o_usat->name, 'Chad marker';
58
 
ok $o_usat->position, $position ;
59
 
ok $map->add_element($o_usat);
60
 
 
61
 
#use Data::Dumper; print Dumper($map);
62
 
#----------------------------
63
 
#ok my $position2 = new Bio::Map::LinkagePosition(-order => qw(3 4 5),
64
 
#                                                );
65
 
# print("position2 looks like this:\n");
66
 
# dumpValue($position2);
67
 
#ok(($position2->each_position_value('fakemap'))[0] == 0);
68
 
#ok $position2->order, 3;
69
 
 
70
 
#-------------
71
 
#ok($position->order, 2);
72
 
#ok(($position->each_position_value($map))[0], 22.3);
73
 
        # what should be printed if this was ok?
74
 
        # ok(1);
75
 
 
76
 
#ok my $o_usat = new Bio::Map::Microsatellite('-name'     => "Chad marker",
77
 
#                                             '-position' => $position);
78
 
#
79
 
#ok $o_usat->name, 'Chad marker';
80
 
#ok $o_usat->position, $position ;
81
 
#ok $map->add_element($o_usat);
82
 
# what should be printed if this is ok?
83
 
#dumpValue($map);
84
 
 
85
 
# add more tests
86
 
# see also t/microsatellite.t and t/linkageposition.t