Supply TEMPLATE and SUFFIX for temporary query sequence files.
[bioperl-run.git] / t / Mdust.t
blob800f9644dadd00d0da2bf2c370f05d324ecba25a
1 use strict;
2 use vars qw($NUMTESTS);
3 BEGIN {
4     use Bio::Root::Test;
5     test_begin(-tests => 5);
6         use_ok('Bio::Tools::Run::Mdust');
7         use_ok('Bio::SeqIO');
10 my $input = Bio::SeqIO->new( -file      => test_input_file('NM_002254.gb'),
11                              -format    => 'Genbank' );
13 my $seq = $input->next_seq;
15 my $mdust = Bio::Tools::Run::Mdust->new(
16                                         -target         => $seq,
17                                         );
18 isa_ok $mdust, "Bio::Tools::Run::Mdust";
20 SKIP: {
21         test_skip(-requires_executable => $mdust,
22                           -tests => 2);
23         
24         $mdust->run;    
25         
26         my @excluded = grep { $_->primary_tag eq 'Excluded' } $seq->top_SeqFeatures;
27         
28         is (scalar(@excluded),3);
29         
30         my $input2 = Bio::SeqIO->new( -file     => test_input_file('NM_002254.tfa'),
31                                           -format       => 'Fasta');
32         
33         my $seq2 = $input2->next_seq;
34         
35         $mdust->coords(0);
36         my $masked = $mdust->run($seq2);
37         
38         like $masked->seq, qr/N+/;