gchen98 / macs

Automatically exported from code.google.com/p/macs
16 stars 6 forks source link

Low admixture proportion and small sample sizes cause memory error #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have experienced a crash when simulating the following model for pop1 size = 
8 and pop2 size = 18:

          __|     t = 0.7
         |   |
         |   |
         |   |
         |   |\    t = 0.07
         |   |  \
         |   |   |
         |   |   |
          \  |   |
            -|   |  f = <admixture>%, t = 0.0035
              |   |
              |   |
 pop  3   1   2

The model includes admixture at t=0.0035, and from that time to the present the 
population's size is zero. The only purpose population 3 serves is to introduce 
a more ancient lineage into population 1.  

Here is a sample command line that crashes:
macs 26 1e7 -i 1 -s 1 -t 0.0008 -r 0.0004 -h 1e3 -I 2 8 18 -n 1 0.5 -n 2 0.5  
-es 0.0035 1 0.3 -en 0.0035 3 1.0  -ej 0.07 2 1 -en 0.07 1 1.0  -ej 0.7 3 1 -en 
0.7 1 1.0

The error becomes more likely with:  

What is the expected output? What do you see instead?
Macs works as normal until a sudden memory error. A portion of the output file 
is written. Example error output is attached.

What version of the product are you using? On what operating system?
I am using macs 0.4e on Ubuntu.

Original issue reported on code.google.com by katie...@email.arizona.edu on 9 Jul 2012 at 5:23

Attachments:

GoogleCodeExporter commented 9 years ago
I'm sorry, I forgot to say:
The crash appears to be influenced by the randomness in the simulation, and it 
is more or less likely to occur with different parameter values. The error 
becomes more likely with longer length, more iterations, and (most 
interestingly) smaller admixture proportion.  The error becomes less likely 
with larger sample sizes. 

Original comment by katie...@email.arizona.edu on 9 Jul 2012 at 5:36

GoogleCodeExporter commented 9 years ago
Thank you for posting this issue.  I actually posted this earlier on your 
behalf in the previous issue but closed it.  (if you select All Issues in the 
drop down above you can see it).  I'll close this one once you get a working 
resolution.  As I suggested, you can try increasing sample size.  Increasing 10 
fold worked reliably for me and took only a few seconds to complete.

Original comment by gche...@gmail.com on 9 Jul 2012 at 1:31

GoogleCodeExporter commented 9 years ago
Thanks Katie for posting the issue.  I will close this as I have posted this 
previously on your behalf.

Original comment by gche...@gmail.com on 13 Aug 2012 at 7:46