2 ## Bioperl Test Harness Script for Modules
7 test_begin(-tests => 7);
9 use_ok('Bio::Tools::Run::Vista');
10 use_ok('Bio::AlignIO');
14 #Java and java version check
17 skip("Skipping because no java present to run vista", 5);
20 open(PIPE,"java -version 2>&1 |");
22 if (/Java\sVersion\:\s(\d+\.\d+)/) {
26 elsif (/java version\s.(\d+\.\d+)/) {
30 elsif (/java version\s\"(\d\.\d)"/) {
36 skip("Skipping due to old java version", 5);
39 open (PIPE ,'java Vista 2>&1 |');
41 if ( /NoClassDefFoundError/
42 # For JRE 1.7.0_25 - Win7 - Spanish, the message is:
43 # "Error: no se ha encontrado o cargado la clase principal Vista"
46 diag('Vista.jar is not in your class path: '.$_);
47 skip("Vista.jar is not in your class path",5);
50 my $inputfilename= test_input_file("vista.cls");
51 my $gff_file = test_input_file("vista.gff");
52 my $aio = Bio::AlignIO->new(-file => $inputfilename,
53 -format => 'clustalw');
54 my $aln = $aio->next_aln;
56 my $out= test_output_file();
57 my $vis = Bio::Tools::Run::Vista->new('outfile' => $out,
58 'title' => "My Vista Plot",
59 'annotation' => $gff_file,
60 'annotation_format' => 'GFF',
71 'color' => {'EXON'=>'45 25 54','CNS'=>'0 0 100'},
73 isa_ok $vis,'Bio::Tools::Run::Vista';
75 is $vis->annotation, $gff_file;
79 $vis->run($aln,'mouse');