[Bio] / FigKernelPackages / ProtSims.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/ProtSims.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13, Mon Aug 30 16:09:00 2010 UTC revision 1.14, Mon Aug 30 16:21:34 2010 UTC
# Line 168  Line 168 
168          &gjoseqlib::print_alignment_as_fasta($tmpQ,\@rerun);          &gjoseqlib::print_alignment_as_fasta($tmpQ,\@rerun);
169          # my $cmd = "$blastall_cmd -m 8 -i $tmpQ -d $dbF -FF -p blastp -e 1e-5";          # my $cmd = "$blastall_cmd -m 8 -i $tmpQ -d $dbF -FF -p blastp -e 1e-5";
170          my @cmd = ($blastall_cmd,  '-m', 8, '-i', $tmpQ, '-d', $dbF, '-FF', '-p', 'blastp', '-e', '1e-5');          my @cmd = ($blastall_cmd,  '-m', 8, '-i', $tmpQ, '-d', $dbF, '-FF', '-p', 'blastp', '-e', '1e-5');
         print STDERR "@cmd\n";  
171          #print STDERR "$cmd\n";          #print STDERR "$cmd\n";
172          #open(BL, "$cmd|") or die "ProtSims::blastP: pipe to blast failed with $!: $cmd\n";          #open(BL, "$cmd|") or die "ProtSims::blastP: pipe to blast failed with $!: $cmd\n";
173    
174          open(BL, "-|", @cmd) or die "ProtSims::blastP: pipe to blast failed with $!: @cmd\n";          #
175            # It'd be nice to do this but windows doesn't support it.
176          my @blastout = map { chomp; [split(/\s+/,$_)] } <BL>;          #
177            #open(BL, "-|", @cmd) or die "ProtSims::blastP: pipe to blast failed with $!: @cmd\n";
178            my $out_tmp = "$tmp_dir/blast_out.$$";
179            push(@cmd, "-o", $out_tmp);
180            print STDERR "@cmd\n";
181            my $rc = system(@cmd);
182            if ($rc != 0)
183            {
184                warn "Error rc=$rc running blast: @cmd\n";
185            }
186            else
187            {
188                if (open(BL, "<", $out_tmp))
189                {
190                    while (<BL>)
191                    {
192                        chomp;
193                        push @sims, [ split(/\s+/, $_) ];
194                    }
195                    #my @blastout = map { chomp; [split(/\s+/,$_)] } <BL>;
196                    # push(@sims,@blastout);
197          close(BL);          close(BL);
198          push(@sims,@blastout);              }
199            }
200            unlink $out_tmp;
201          unlink $tmpQ;          unlink $tmpQ;
202      }      }
203    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3