Segmentation Fault (core dumped) When Estimating Parameters from 2 SFS

1,116 views
Skip to first unread message

Alex Krohn

unread,
Jul 20, 2016, 1:54:56 PM7/20/16
to fastsimcoal
Hi Laurent,

I'm getting an error that I'm unsure how to remedy. I attempted to follow your example in the manual for estimating parameters of the isolation with migration scenario. I generated my SFS from ANGSD (using realSFS). They are folded because I do not have a reference genome for my species. I copied and pasted the .est and .tpl files from the manual, and then was attempting to use my own two SFS generated for pop 1 and pop 0 (of N1 and N2 respectively). The only things I changed were the sample sizes in the .tpl file to reflect the actual sample sizes that I used -- the rest I left the same. The program runs and says the parameter files were read correctly. It makes some estimates, but then fails after "Brent minimization result" and says "Segmentation fault (core dumped)." I assume this is because of some input parameter that is missing or different, but I have no idea where to start. If I change my SFS files to include the "d0 1  d0 2 .... d0 10" I get this same error. Any idea what's causing this?

Attached are my input files and below is the copy of the error. Thanks very much for your help! I'm very keen to use your program!

Best regards,

Alex

fsc25 -t tmsim.tpl -e tmsim.est -n 100000 -N 100000 -M 0.001 -d -l 10 -L -c 4 


fastsimcoal was invoked with the following command line arguments:

fsc25 -t tmsim.tpl -e tmsim.est -n 100000 -N 100000 -M 0.001 -d -l 10 -L -c 4 

Maximum number of loops is smaller than minimum number of loops. Setting max to min

Reading parameter settings file tmsim.est...

done reading parameter settings file!


Random generator seed : 610749


Deme sizes

Deme 0 15656

Deme 1 19223



Sample sizes

Deme 0 13

Deme 1 5


Sample ages

Deme 0 0

Deme 1 0


Growth rates

Deme 0 0

Deme 1 0



Migration matrix 0

 0.0000000  8.0776145 

 1.1783930  0.0000000 



Migration matrix 1

 0.0000000  0.0000000 

 0.0000000  0.0000000 



Historical events

Event 0


#Time             : 2308

#Source           : 0

#Sink             : 1

#Migrants         : 1.0000000

#New size         : 1.7530042

#New growth rate  : 0.0000000

#New migr. matrix : 1




Number of independent loci to simulate : 1

with the same chromosomal structure


Number of linkage blocks to simulate in structure 1: 1

Data type: FREQ   :  recombination and mutation rates

0.0000000000   0.0000000250   

   Do not output expected MAF spectrum

   Do not output expected DAF spectrum


Estimating model parameters using 12 batches and 1 thread


Observed data file ("../tmsim_jointDAFpop1_0.obs") does not seem to be present

Unable to compute the likelihood 


Estimation of parameters by conditional maximization via Brent algorithm


Initial parameters:

33698 15656 19223 2308 8.07761e-06 1.17839e-06 lhood=0.0000000000



Current parameters:

33698 15656 19223 2308 8.07761e-06 1.17839e-06


100000 simulations per lhood estimation


Brent minimization result: ANCSIZE = 9.86930e+04 (lhood = 0.00000e+00)

Segmentation fault (core dumped)

tmsim_jointMAFpop0.obs
tmsim_jointMAFpop1.obs
tmsim.est
tmsim.tpl

Alex Krohn

unread,
Jul 25, 2016, 2:03:08 PM7/25/16
to fastsimcoal
Hi all,

It seems that FSC runs when I rename the file tmsim_jointDAFpop1_0.obs. However, the observed and expected likelihood values differ by 5 orders of magnitude, indicating that my data does not fit the model very well. I have removed all missing data, and am using now the JOINT 2D spectrum for both populations (population 0 and 1). I fear that this may be happening because FSC is expecting an unfolded spectrum (DAF) while I am giving it a folded spectrum (MAF). However, when I change the name to tmsim_jointMAFpop1_0.obs, it fails to run. It only runs if the input SFS is named tmsim_jointDAFpop1_0.obs.

Any idea why FSC won't recognize my MAF SFS?

Thanks for your help!

-Alex

Laurent Excoffier

unread,
Sep 21, 2016, 12:23:09 PM9/21/16
to fasts...@googlegroups.com
Hi,

your sfs files (*.obs) are not properly formatted. Look at the manual how to format it correctly

best
laurent
Reply all
Reply to author
Forward
Message has been deleted
0 new messages