-Strace exceptions
Closed this issue · 2 comments
I have cloned into latest code that is posted here and compiled it. I'm looking to pass a frequency trajectory file. After running into plenty of exceptions, I decided to run a test simulation with -oTrace and then pass that trajectory back to msms.
java -jar msms.jar -N 10000 -ms 10 1 -t 4 -r 4 -SAA 5 -SAa 2.5 -SF 0 0.7 -Sp 0.5 -oTrace
I cut off all output that isn't related to the trajectory to get a frequency trace that looks like:
0.21575 0.9999 1.0E-4
0.215725 0.99985 1.5E-4
0.2157 0.99995 5.0E-5
0.215675 0.9999 1.0E-4
0.21565 0.9999 1.0E-4
0.215625 0.9998 2.0E-4
0.2156 0.99975 2.5E-4
0.21557500000000002 0.99975 2.5E-4
0.21555000000000002 0.99965 3.5E-4
0.21552500000000002 0.99965 3.5E-4
...
Saving the complete trajectory in trajectory.txt and passing this to msms with -Strace gives the following error.
java -jar msms.jar -N 10000 -ms 10 1 -t 4 -r 4 -Strace trajectory.txt
ms -N 10000 10 1 -t 4 -r 4 -Strace trajectory.txt [3.2rc Build:81]
0xb84cd0e908815ae3
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at at.mabs.model.selection.SuperFrequencyTrace.getFrequencys(SuperFrequencyTrace.java:142)
at at.mabs.model.selection.SelectionData.getFrequency(SelectionData.java:268)
at at.mabs.model.selection.SelectionData.coalescentCumulantIntegration(SelectionData.java:296)
at at.mabs.coalescent.CoalescentEventCalculator.nextCoalescentSelection(CoalescentEventCalculator.java:361)
at at.mabs.coalescent.CoalescentEventCalculator.nextEventSelection(CoalescentEventCalculator.java:90)
at at.mabs.coalescent.CoalescentEventCalculator.calculateCoalescentHistory(CoalescentEventCalculator.java:520)
at at.MSLike.run(MSLike.java:301)
at at.MSLike.runThreads(MSLike.java:424)
at at.MSLike.runMe(MSLike.java:191)
at at.MSLike.main(MSLike.java:541)
at at.MSLike.main(MSLike.java:585)
Somewhat perplexingly, about 10% of the time it "works" and produces output. For example:
java -jar msms.jar -N 10000 -ms 10 1 -t 4 -r 4 -Strace trajectory.txt
ms -N 10000 10 1 -t 4 -r 4 -Strace trajectory.txt [3.2rc Build:81]
0xc5bc9fa71ec78045
//
segsites: 6
positions: 0.0931092357 0.1244903960 0.2402095753 0.3468718393 0.7654496949 0.9065454944
010110
111110
010110
000000
110110
110110
110110
111110
010110
010111
This is a known issue. In fact just about all the issues are the same section of code. I am working on it right now.
Cheers, I hope to be able to use it soon.