A test to ensure Bio::PrimarySeqI->trunc() doesn't use clone() for a Bio::Seq::RichSe...
[bioperl-live.git] / t / Map / Linkage.t
blobaf43aa04c8bcb37267bd11feec594cb8ea2ed35b
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 18);
11         
12         use_ok('Bio::Map::LinkagePosition');
13         use_ok('Bio::Map::Microsatellite');
14         use_ok('Bio::Map::LinkageMap');
17 #require_ok('dumpvar.pl');
19 my $verbose = test_debug();
20 ok my $map = Bio::Map::LinkageMap->new('-verbose' => $verbose,
21                                    '-name'    => 'Leviathon',
22                                    '-type'    => 'Genetic',
23                                    '-units'   => 'cM',
24                                    '-species' => "Brassica");
25 is ref($map), 'Bio::Map::LinkageMap';
26 is $map->name, 'Leviathon';
27 is $map->type, 'Genetic';
28 is $map->units, 'cM';
29 is $map->species, 'Brassica';
30 is $map->unique_id, '1';
32 ok my $position = Bio::Map::LinkagePosition->new('-order' => 2,
33                                                 '-map' =>  $map, 
34                                                 '-value' => 22.3
35                                                 );
37 is $position->order, 2;
38 ok my $map2 = $position->map;
39 is $position->value, 22.3;
41 ok my $o_usat = Bio::Map::Microsatellite->new('-name'     => "Chad marker",
42                                              '-position' => $position);
44 is $o_usat->name, 'Chad marker';
45 is $o_usat->position, $position ;
46 ok $map->add_element($o_usat);
48 #use Data::Dumper; print Dumper($map);
49 #----------------------------
50 #ok my $position2 = Bio::Map::LinkagePosition->new(-order => qw(3 4 5),
51 #                                                );
52 # print("position2 looks like this:\n");
53 # dumpValue($position2);
54 #is(($position2->each_position_value('fakemap'))[0], 0);
55 #is $position2->order, 3;
57 #-------------
58 #is($position->order, 2);
59 #is(($position->each_position_value($map))[0], 22.3);
60         # what should be printed if this was ok?
61         # ok(1);
63 #ok my $o_usat = Bio::Map::Microsatellite->new('-name'     => "Chad marker",
64 #                                             '-position' => $position);
66 #is $o_usat->name, 'Chad marker';
67 #is $o_usat->position, $position ;
68 #ok $map->add_element($o_usat);
69 # what should be printed if this is ok?
70 #dumpValue($map);
72 # add more tests
73 # see also t/microsatellite.t and t/linkageposition.t