[Biojava-dev] OutOfMemory when using a big Weight Matrix to find Motifs in 1.3.1 but not in 1.3

Bruno Aranda - e-BioIntel elmosca at terra.es
Mon Jan 26 13:07:17 EST 2004


Hello everybody :-)

Recently I've updated from 1.3 to 1.3.1 and I've found that a class that 
I used to find motifs no longer works. In that class I create a weight 
matrix from a matrix with 15 rows and then I use the matrix to search a 
sequence of 5 Megabases for possible motifs. In version 1.3 there were 
no problems but with the newer version there are. I guess it has 
something to do with SequenceViewer... I've also tried with the last 
nightly shot and the same problem happens. The error I get is an 
OutOfMemoryError

The matrix I create is this one:

-------------------------------------------------------------------

Distribution[] dists = new Distribution[15];
       
        double[] as = new double[] 
{61,16,352,3,354,268,360,222,155,56,83,82,82,68,77};
        double[] cs = new double[] 
{145,46,0,10,0,0,3,2,44,135,147,127,118,107,101};
        double[] gs = new double[] 
{152,18,2,2,5,0,20,44,157,150,128,128,128,139,140};
        double[] ts = new double[] 
{31,309,35,374,30,121,6,121,33,48,31,52,61,75,71};
       
        try {
           
            for (int i=0; i<dists.length; i++) {
                Count c = new IndexedCount(alpha);
                c.increaseCount(DNATools.a(),as[i]);
                c.increaseCount(DNATools.c(),cs[i]);
                c.increaseCount(DNATools.g(),gs[i]);
                c.increaseCount(DNATools.t(),ts[i]);
               
               // System.out.println(as[i]+" "+cs[i]+" "+gs[i]+" "+ts[i]);
               
                dists[i] =  DistributionTools.countToDistribution(c);
            }
        } catch (Exception e) {
            System.err.println(e);
        }

-----------------------------------------------------------------

With the array of Distributions I create the WeightMatrix and use it on 
the sequence 'gi|30018278|ref|NC_004722.1| Bacillus cereus ATCC 14579, 
complete genome'.
When the method 'annotate' of WeightMatrix is executing the error raises.
I don't get the error when using simpler motifs...

Any help and workaround is appreciated... and congratulations for this 
wonderful project which (sometimes) can help me sleep better ;-)
TIA,

Bruno Aranda
ebioIntel



More information about the biojava-dev mailing list