Mach mal:
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
#!/usr/bin/perl -w
use strict;
use warnings;
use Bio::SeqIO;
use Bio::Tools::Run::RemoteBlast;
use Bio::Seq;
use IO::String;
use Bio::SearchIO;
my $prog = 'blastp';
my $db = 'swissprot';
my $e_val = '20000';
my $matrix = 'PAM30';
#my $outfile = 'Output';
my @data;
my $line_dataArray;
my $rid;
my $count = 1;
my @params = (
'-prog' => $prog,
'-data' => $db,
'-expect' => $e_val,
'-matrix' => $matrix
);
my $seqio_obj = Bio::SeqIO->new(
-file => "Perm.txt",
-format => "raw",
);
print "entering blast....";
my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
print "Blast entered successfully \n";
while ( my $query = $seqio_obj->next_seq ) {
print "submit Sequence...just do it....\n";
my $r = $factory->submit_blast($query);
print $query->seq;
print "\n";
# Wait for the reply and save the output file
print "entering while loop for saving Output.... \n";
while ( my @rids = $factory->each_rid ) {
foreach my $rid (@rids) {
my $rc = $factory->retrieve_blast($rid);
if ( !ref($rc) ) {
print '$rc is not a ref!', "\n";
if ( $rc < 0 ) {
print "Remove rid ...\n";
$factory->remove_rid($rid);
}
# sleep 5;
}
else {
print "retrieved Results successfully \n";
print $rid;
print "\n";
my $filename = "$count.out";
#my $checkname = "check$count.out";
$factory->save_output($filename);
print "File saved successfully \n";
my $checkinput = $factory->file;
open(my $fh,"<$checkinput") or die $!;
while(<$fh>){
print;
}
close $fh;
$count++;
$factory->remove_rid($rid);
}
}
print "\n";
print "\n";
}
}
BTW: Auf welchem Betriebssystem arbeitest Du? Bioperl-Version? Perl-Version?