[Bioperl-l] bl2seq and disappearing variables

Jason Stajich jason at cgt.duhs.duke.edu
Wed May 7 16:01:17 EDT 2003


Are you sure - it happens before you call that line - are you sure you're
really going through as many iterations of the loop as you think.

It is likely you are accidently loading an empty value into your %list
hash so you could just do
print join(",", keys %list), "\n";

before all of this to make sure things are sane.

-j
On Wed, 7 May 2003, James Wasmuth wrote:

> Hi all,
>
> I've  started to use bl2seq and am having a perplexing problem.  I
> couldn't find this being asked previously so guess it may be a mistake
> in my Perl code, but if any one can see it then I'd be grateful.
>
> This is part of a script where two files are fetched and input into
> bl2seq...
>
> for my $cluster_id (keys %list) {
>     print ": $cluster_id : $list{$cluster_id}[0]\n";
>     my $file1=$list{$cluster_id}[0];
>     my $file2=$list{$cluster_id}[1];
>     print "$file1:$file2\n";
>     my $input1="$path2files/$file1.pep";
>     my $input2="$path2files/$file2.pep";
>     print "$input1:$input2\n";
>
>     my $factory = Bio::Tools::Run::StandAloneBlast->new('outfile' =>
> "$outdir/$cluster_id.out",'program'=>'blastp');
>     my $bl2seq_report = $factory->bl2seq($input1, $input2);
> }
>
>
> I get the following error:
>
> ------------- EXCEPTION  -------------
> MSG:  indiv_seq/Peptide/.pep  not Seq Object or file name!
> STACK Bio::Tools::Run::StandAloneBlast::bl2seq
> /usr/local/lib/perl5/site_perl/5.8.0/Bio/Tools/Run/StandAloneBlast.pm:539
> STACK toplevel /necator/jamesw/bin/bl2seq_nb.pl:36
>
> --------------------------------------
>
>
> When I ask to print out $cluster_id nothing is printed.  However if I
> comment out my $bl2seq_report = $factory->bl2seq($input1, $input2);
>  then $cluster_id is found!  I am also able to run bl2seq as a system
> call in the program with the desired results.
>
> I tried reading the files in as seq objects through SeqIO, but again I
> can the error caused through the disappearence of $cluster_id!
>
> Anyone any ideas?
>
> J
>
>
>
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list