3 # ## Bioperl Test Harness Script for Modules
7 eval { require Test
; };
14 plan tests => $NTESTS;
18 foreach ( $Test::ntest..$NTESTS ) {
19 skip('Unable to run Genscan tests, exe may not be installed',1);
23 use Bio::Tools::Run::Genscan;
27 if(! $ENV{'GENSCANDIR'}){
28 warn("Need to define env variable GENSCANDIR to run test");
32 my $paramfile = Bio::Root::IO->catfile($ENV{'GENSCANDIR'},"HumanIso.smat");
33 my @params = ('MATRIX',$paramfile);
34 my $factory = Bio::Tools::Run::Genscan->new(@params);
35 ok $factory->isa('Bio::Tools::Run::Genscan');
38 my $inputfilename = Bio::Root::IO->catfile("t","data","Genscan.FastA");
39 my $seq1 = Bio::Seq->new();
40 my $seqstream = Bio::SeqIO->new(-file => $inputfilename, -format => 'Fasta');
41 $seq1 = $seqstream->next_seq();
43 my $genscan_present = $factory->executable();
45 unless ($genscan_present) {
46 warn("Genscan program not found. Skipping tests $Test::ntest to $NTESTS.\n");
50 my @feat = $factory->predict_genes($seq1);
52 my $protein = $feat[0]->predicted_protein();
54 ok $feat[0]->isa("Bio::SeqFeatureI");
55 ok $protein->isa("Bio::PrimarySeqI");