On Tue, 21 Aug 2001, webmaster wrote:
> what does
> Global symbol "@ARG" requires explicit package name at testbio1.pl line 4.
> Global symbol "$sbjct_scr" requires explicit package name at testbio1.pl
> line 29
> .
> Global symbol "%query_conunts" requires explicit package name at
> testbio1.pl lin
> e 46.
> Global symbol "$sbjct_srs" requires explicit package name at testbio1.pl
> line 48
> mean?
It looks like you have a lot of typos in your code. You have several
declared variables, but then you misspell them later.
> #!/usr/bin/perl
> use strict;
> my $REPORT_FILE="report.txt";
> my $blast_file=$ARG[0]||'blast.dat';
Should be $ARGV[0]
> #go trought the blast file line by line, concat all the query and sbj seqs
> while (my $line=<IN>)
> {
> chomp $line;
> print "processing line $. \n";
> open (IN, $blast_file) or die "$0: ERROR: $blast_file: $!";
> my @words=split /\s+/, $line;
> if ($line=~ /^Query/)
> {
> $query_src .=$words[2];
> }
> elsif ($line =~ /^Sbjct/)
> {
> $sbjct_scr .=$words[2];
You declare this as sbjct_src earlier.
> }
> }
> #next line closes the blast file
> close IN;
>
> #analysis part
> my @patterns=('gtccca', 'gcaatg', 'cagct', 'tcggga', '-');
>
> #find the patterns and sotore them in to the hashes
> my (%query_counts, %sbjct_counts);
>
> #search and store
> foreach my $pattern (@patterns)
> {
> while ($query_src=~ /$pattern/g)
> {
> $query_conunts{$pattern}++;
Should be $query_counts, right?
> }
> wile ($sbjct_srs=~ /$pattern/g)
And this should be $sbjct_src -- again, another typo in your code.
-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Just remember, wherever you go, there you are.
-- Buckaroo Bonzai
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]