[Biojava-dev] OutOfMemory when using a big Weight Matrix to find
Motifs in 1.3.1 but not in 1.3
mark.schreiber at group.novartis.com
mark.schreiber at group.novartis.com
Mon Jan 26 20:21:36 EST 2004
Hi Bruno -
There was a change in WeightMatrix from 1.3 to 1.3.1. The change was to
allow the choice of a ScoreType. There may have been a memory leak
introduced here. Matthew, do you know what might be causing this?
If thats not it you may have to run a profiler on your program to try and
find out where all your memory is going. As a hack you can increase the
amount of memory available to the Java stack by using the -Xmx option for
the java program. Have a look at the documentation for your JVM for the
correct syntax. Something like
java -Xmx512m myprogram
will give 'myprogram' 512MB to play with. That may help until we can track
down the error.
Mark Schreiber
Principal Scientist (Bioinformatics)
Novartis Institute for Tropical Diseases (NITD)
1 Science Park Road
#04-14 The Capricorn
Singapore 117528
phone +65 6722 2973
fax +65 6722 2910
Bruno Aranda - e-BioIntel <elmosca at terra.es>
Sent by: biojava-dev-bounces at portal.open-bio.org
01/27/2004 02:07 AM
Please respond to biodev
To: biojava-dev at biojava.org
cc:
Subject: [Biojava-dev] OutOfMemory when using a big Weight Matrix to find Motifs in
1.3.1 but not in 1.3
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
_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev
More information about the biojava-dev
mailing list