[Bioperl-l] questions: [NULL_Caption] FATAL ERROR: CoreLib [001.000] 1>: Failed to allocate 10000 byte

=?gb2312?B??= lichunjiang at sibs.ac.cn
Wed Sep 10 22:23:26 EDT 2003


Hi,
I\'ve written a program to do local blast and extract information on the gene near to the hits.The program works well with fly genome,but it fail to work with human genome.Following error is suggested:

[NULL_Caption] FATAL ERROR: CoreLib [001.000]  1>: Failed to allocate 10000 bytes
Is that due to the large datasize? 
You are appratiated to help!


#! /usr/bin/perl
use strict;
use warnings;
use Bio::SeqIO;
use Bio::Seq;
use Bio::Tools::Run::StandAloneBlast;
use Bio::SearchIO;

my $bits=200;
my $infile=\"#defined inflie\";
my $database=\'##\';


open(OU,\">defined outfile\") or die \"cannot open output.\\n\";
print OU \"\\#Input :\\t\\t $infile\\n\";
print OU \"\\#Bits Limit:\\t$bits\\n\";
my @params=(\'database\' =>$database,
            \'program\'  =>\'blastn\',
            \'e\'        =>\'10\',
            \'W\'        =>\'15\',
            \'_READMETHOD\' =>\'Blast\');
            
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
my $io=Bio::SeqIO->new(\'-file\' => $infile,
                        \'-format\' =>\'fasta\');
my $Oinseq;

while($Oinseq=$io->next_seq)
{      
my $blast_report = $factory->blastall($Oinseq);
print \"blast\\n\";

my $hsptable;
my $searchio = new Bio::SearchIO(\'-file\' => $blast_report->file);
my $blast_result = $searchio->next_result;
while (my $hit=$blast_result->next_hit)
 {  my $hitbits = $hit->bits();
    $hitbits =~s/^e/1e/;
    next if ($hitbits<=$bits);
   
    while (my $hsp=$hit->next_hsp())
    {   my $hspbits=$hsp->bits();
        $hspbits=~s/^e/1e/;
    	
    	if ($hspbits<=$bits)
        {next;}
        else
          {$hsptable->{$hit->accession}->{$hsp->hstart}=$hsp->hend;
         print\"hash\\n\";} 
    }
 }  
 my $count=1; 
my $acc;
my $hsphash;
my $hspst;
my $hspend;  
my $eq;
my $aseq;
my $cseq;
my $Oseq;
my $read=1;
my $write=1;
my $bgene;
my $hgene;
while(($acc,$hsphash)=each %$hsptable)
 {
    my $ino = Bio::SeqIO->new(\'-file\'=>\"F:/data/$database/$acc.gbk\", 
                                \'-format\'=>\'genbank\');
       my $Oseq = $ino->next_seq;
        print \" read $read\\n\";
       my @feat=$Oseq->get_SeqFeatures();
        print \"features\\n\";
       $read++;

                              
      while(($hspst,$hspend)= each %$hsphash)
      { print OU \"#$count  ACC: $acc\\tStart: $hspst\\tEnd: $hspend#\\n\";
      
        $count++;
         foreach my $feat(@feat)
            { 
             if ($feat->primary_tag eq \'CDS\')
                 { my $featend   = $feat->end;
                   my $featstart = $feat->start;
                   if( ($hspst-$featend)>=0)
                       { $bgene=\'\';
                         if ($feat->has_tag(\'gene\'))
                            {$bgene= join(\'\',$feat->each_tag_value(\'gene\'));
                              next;}
                       } 
                   if (($hspend-$featstart)<=0)
                       { $hgene=\'\';
                        if ($feat->has_tag(\'gene\'))
                            {$hgene= join(\'\',$feat->each_tag_value(\'gene\'));
                              last;}   
                        }          
                 }        
            }
          #$eq=$Oseq->subseq($hspst-100,$hspend+100);
          print OU \"$bgene and $hgene\\n\";
          # print OU \"$eq \\n\\n\";  
                   
     }
  }  
 
}                              
    
               






More information about the Bioperl-l mailing list