File: Assembly.t

package info (click to toggle)
bioperl 1.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 20,336 kB
  • ctags: 8,476
  • sloc: perl: 119,890; xml: 6,001; lisp: 121; makefile: 57
file content (97 lines) | stat: -rw-r--r-- 2,000 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# This is -*-Perl-*- code
## Bioperl Test Harness Script for Modules
##
# $Id: Assembly.t,v 1.2 2002/12/01 00:35:45 jason Exp $

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.t'

use strict;
use vars qw($NUMTESTS $DEBUG);
$DEBUG = $ENV{'BIOPERLDEBUG'} || 0;

my $error;

BEGIN {
    # to handle systems with no installed Test module
    # we include the t dir (where a copy of Test.pm is located)
    # as a fallback
    eval { require Test; };
    $error = 0;
    if( $@ ) {
        use lib 't';
    }
    use Test;

    $NUMTESTS = 13;
    plan tests => $NUMTESTS;
    eval { require DB_File };
    if( $@ ) {
	print STDERR "DB_File not installed. This means the Assembly modules are not available.  Skipping tests.\n";
	for( 1..$NUMTESTS ) {
	    skip("DB_File not installed",1);
	}
	$error = 1; 
    }
}


END { 
    foreach ( $Test::ntest..$NUMTESTS) {
	skip('unable to run all of the DB tests',1);
    }
}

if( $error ==  1 ) {
    exit(0);
}

#syntax test

require Bio::Assembly::IO;
require Bio::Assembly::Scaffold;
require Bio::Assembly::Contig;
require Bio::Assembly::ContigAnalysis;

use Data::Dumper;

ok 1;

#
# Testing IO
#

# -file => ">".Bio::Root::IO->catfile("t","data","primaryseq.embl")

ok my $in = Bio::Assembly::IO->new
    (-file=>Bio::Root::IO->catfile
     ("t","data","consed_project","edit_dir","test_project.phrap.out"));

ok my $sc = $in->next_assembly;
#print Dumper $sc;

#
# Testing Scaffold
#


ok $sc->id, "NoName";
ok $sc->id('test'), "test";

ok $sc->annotation;
skip "no annotations in Annotation collection?", $sc->annotation->get_all_annotation_keys, 0;
skip "should return a number", $sc->get_nof_contigs, undef ; 
ok $sc->get_nof_sequences_in_contigs, 2;
skip "should return a number", $sc->get_nof_singlets, 0;
skip $sc->get_seq_ids, 2;
skip $sc->get_contig_ids, 1;
skip "nothing to test", $sc->get_singlet_ids;


#
# Testing Contig
#

#
# Testing ContigAnalysis
#