gchen98 / macs

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

error with 'tbs' flag #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I ran macs with the following command:
macs 4 1e6 -t .004112508 -r .004112508 -h 1e2 -I 2 2 2 0 -n 1 .5153702 -eM tbs 
tbs -eM tbs 0 -ej 10.26451 2 1 <priors

I received the following error:

COMMAND:        /home/smalls/programs_that_work/macs/macs 4 1e6 -t .004112508 
-r .004112508 -h 1e2 -I 2 2 2 0 -n 1 .5153702 -eM tbs tbs -eM tbs 0 -ej 
10.26451 2 1
INPUT: Sample size is now 4
INPUT: Seq length is now 1e+06
INPUT: Scaled mutation rate is now 4112.51
INPUT: Scaled recombination rate is now 4112.51
INPUT: Base pairs to track is 100
INPUT: Setting chr sampled for pop 1 to 2
INPUT: Setting chr sampled for pop 2 to 2
INPUT: Global migration rate to 0
INPUT: Pop 1 has size: 0.51537
INPUT: At time 0: Global migration rate is 0
INPUT: At time 0: Error, this event is redundant with a previous time.  Please 
increment it slightly from 0 to prevent unpredictable results
Simulator destructor:
Configuration destructor
[1]    13988 segmentation fault  ~/programs_that_work/macs/macs 4 1e6 -t 
.004112508 -r .004112508 -h 1e2 -I 2

It would seem that macs is not recognizing the tbs flag. Is there another way 
of reading in parameter values in macs for use in ABC?

Original issue reported on code.google.com by stsm...@gmail.com on 31 Dec 2013 at 4:19

GoogleCodeExporter commented 9 years ago
From a very quick look through the code it appears that there is no way to read 
parameters from a file or stdin (please correct me if I'm wrong).
I have done some quick and dirty tests with msnsam and it turns out that using 
tbs and a prior file leads to a speedup of about 20x, so assuming the same 
would hold for macs it would definitely be worth having it, I think. 
If I understand the code correctly adding some sort of tbs-like functionality 
should be relatively painless (in main() before the parameters get handed over 
to processing). Unless my boss decides differently I will probably give it a 
try next week. I will send any resulting patches to Dr. Chen and post them here 
in this list.

Original comment by hinsch.m...@gmail.com on 3 May 2014 at 4:37

GoogleCodeExporter commented 9 years ago
Sorry I don't think I saw the Dec 31 post.  Feel free to make a copy of the 
macs code and send me a patch.  I am not familiar with tbs but I'm curious.

Original comment by gche...@gmail.com on 4 May 2014 at 8:59

GoogleCodeExporter commented 9 years ago

Original comment by gche...@gmail.com on 19 May 2014 at 8:12