[Bioperl-l] "Too many files open" with bl2seq

Peter Schattner schattner at alum.mit.edu
Mon Apr 14 19:16:58 EDT 2003


Hi all

I am currently stumped by a problem with blast.  I realize now that this is
not a problem with bioperl, but would be still be very grateful if anyone
could suggest what I'm doing wrong or how to work around this problem.

The problem is that I have a number of lists of 20 files each containing a
single fasta seq and I would like to blast each seq from one list against
each sequence in the second list to look for homologs. I have tried this a
number of ways both with and without using bioperl but in the end I always
get a similar error message from blast such as:

[bl2seq] FATAL ERROR: blast: Unable to open input file
results/S_bayanus/4_11_03/4_11_03.S_bayanus.1179.s2.n22.fa
or
Can't exec "./blast/bl2seq": Too many open files at
scripts/compare_top_seqs_1.pl line 146, <GEN1291> line 14.

Here is a simple script which illustrates this problem:

for (my $n1 = 2; $n1 < 20; $n1++) {
  for (my $n2 = 2; $n2 < 20; $n1++) {
    my $command = "./blast/bl2seq -p blastn -i
results/S_bayanus/4_11_03/4_11_03.S_bayanus.1179.s2.n$n1.fa -j
results/S_castelli/4_11_03/4_11_03.S_castelli.1179.s2.n$n2.fa -o
blast.out";
      print "Run n1 = $n1, n2 = $n2\n";
      system($command);
  }
}

Any ideas on how to get past this would be much appreciated.  Thanks.

Peter




More information about the Bioperl-l mailing list