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?
and why on this lines I am getting a comp error...
{
  while ($query_src=~ /$pattern/g)
  {
    $query_conunts{$pattern}++;
  }
  wile ($sbjct_srs=~ /$pattern/g)
  {
    $sbjct_counts{ $pattern }++;
  }
}
 the whole wource code is here:

#!/usr/bin/perl
use strict;
my $REPORT_FILE="report.txt";
my $blast_file=$ARG[0]||'blast.dat';
unless (-e $blast_file)
{
  die "$0: error:missing file: $blast_file";
}
#slurp all the seqs in to the scalar
my ($query_src,$sbjct_src);

#open the blast data file and end prg (DIE) if we can't find it open(IN,
#$blast_file) or die
open (IN, $blast_file) or die "$0: ERROR: $blast_file: $!";

#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];
  }
}
#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}++;
  }
  wile ($sbjct_srs=~ /$pattern/g)
  {
    $sbjct_counts{ $pattern }++;
  }
}

#create an empty report fele
open (OUT, ">$REPORT_FILE" or die "$0: ERROR: cant write $REPORT_FILE";

#print the header of the report file
print OUT "Seq report \n",
        "lo que sea ", scalar localtime, "\n",
        "\nNOTEdfaasafsaada \n",
        "total lenght  of the query dseq:",
        lenght $query_src, " characters \n", "results for  'Query' :\n";

#print the query mathces
foreach (my $key (sort @patterns)
{
  print OUT "\t '$key ' seen $query_counts{$key}\n";
}

print OUT "\nTOTAL lenght  of 'Sbjct' seq: ",
        lenght $sbjct_src, "cahracters\n", "resoults for 'Sbjct':\n";

#print the sbjct mathces
foreach my $key (sort @patterns)
{
  print OUT "\t'$key' seen  $sbjct_counts{$key}\n";
}

close OUT;

__END__
 

cheers 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to