Fsc26 does not seems to interpret the arguments correctly

260 views
Skip to first unread message

kpsim...@gmail.com

unread,
Sep 19, 2019, 3:44:25 AM9/19/19
to fastsimcoal
Dear all,

I was trying to estimate some demographic parameters from a 2-D folded joint SFS when I encountered this issue. There're three demes in my model in where deme 0 merged with deme 1 and then deme 1 merged with deme 2, backwardly in time. The migrations happened between deme 0 and deme 1 before they merged. Only deme 0 and deme 1 were sampled, thus, the input SFS is a 2-D joint SFS consists of samples from deme 0 and deme 1. The folded SFS was used in my dataset. The detailed settings can be found in the .tpl file and .est file in the attachments, along with the outputs of the software.

At first, the software seems to interpret the input command correctly in the stdout:

fastsimcoal was invoked with the following command line arguments:
fsc26 -t 1Con2Iss.tpl -e 1Con2Iss.est -m -L 40 -M -n 100000 -c6 
Reading parameter settings file 1Con2Iss.est...
done reading parameter settings file!
Random generator seed : 126761
Deme sizes
Deme 0 42416
Deme 1 13608
Deme 2 62502

Sample sizes
Deme 0 8
Deme 1 6
Deme 2 0
Sample ages
Deme 0 0
Deme 1 0
Deme 2 0
Growth rates
Deme 0 0
Deme 1 0
Deme 2 0

Migration matrix 0 (note that migration rates have been pre-multiplied by 1e+06n
 0.0000000  6.9483996  0.0000000 
34.1271615  0.0000000  0.0000000 
 0.0000000  0.0000000  0.0000000 

Migration matrix 1 (note that migration rates have been pre-multiplied by 1000000.0000000n
 0.0000000  0.0000000  0.0000000 
 0.0000000  0.0000000  0.0000000 
 0.0000000  0.0000000  0.0000000 

Historical events
Event 0
#Time             : 14102
#Source           : 0
#Sink             : 1
#Migrants         : 1.0000000
#New size         : 1.0000000
#New growth rate  : 0.0000000
#New migr. matrix : 1
Event 1
#Time             : 19907
#Source           : 1
#Sink             : 2
#Migrants         : 1.0000000
#New size         : 1.0000000
#New growth rate  : 0.0000000
#New migr. matrix : 1

Number of independent loci to simulate : 29491
with the same chromosomal structure
Number of linkage blocks to simulate in structure 1: 0
No population growth detected in input file

But from here, it seems to start simulating arlequin-format files instead of estimating the demographic parameters.

Simulating 29491 independent chromosomes using 12 batches and 6 threads.
 
MRCA time for non-recombining chromosome structure 0: 18440
MRCA time for non-recombining chromosome structure 1: 31691
MRCA time for non-recombining chromosome structure 2: 66467
MRCA time for non-recombining chromosome structure 3: 37772
MRCA time for non-recombining chromosome structure 4: 63967
MRCA time for non-recombining chromosome structure 5: 70476
[...] 

It took several hours to complete the task, and the results are 100,000 .arp files instead of the estimation results.

I have noticed a similar issue on this forum. In that thread, Laurent suggested avoiding any overlapping name for parameters, which I have checked carefully and shouldn't be the problem in my issue. 

Any help or suggestion will be greatly appreciated!

Best,
Kung-Ping


Here're the attachments:

Laurent Excoffier

unread,
Sep 19, 2019, 4:34:37 PM9/19/19
to fastsimcoal
Obviously your input file is badly formatted as it attempts to simulate  29491 chromosome, which shoudl not happen if the data were correctly interpreted as of FREQ type.
Look at the simparam file to see if the input file is properly understood by fsc
best
laurent

kpsim...@gmail.com

unread,
Sep 20, 2019, 2:11:15 AM9/20/19
to fastsimcoal
Hi Laurent,

Thank you for your prompt and kind reply.

The reason that I used 29491 independent loci for the estimation is that my observed folded 2D spectrum is from RADseq data which contains 29491 RAD loci which I assume to be independent; the simparam file is here. I have been suspected that this setting may be wrong and have tried the setting with only 1 chromosome, the simparam file is here and the output is as follows:

fastsimcoal was invoked with the following command line arguments:
fsc26 -t 1Con2Iss.tpl -e 1Con2Iss.est -m -M -L 100 -n 100000 -c10 

Reading parameter settings file 1Con2Iss.est...
done reading parameter settings file!
Random generator seed : 786568
Deme sizes
Deme 0 9679
Deme 1 32629
Deme 2 78860


Sample sizes
Deme 0 8
Deme 1 6
Deme 2 0
Sample ages
Deme 0 0
Deme 1 0
Deme 2 0
Growth rates
Deme 0 0
Deme 1 0
Deme 2 0

Migration matrix 0 (note that migration rates have been pre-multiplied by 1e+06n
 0.0000000  1.5434275  0.0000000 
 5.1851422  0.0000000  0.0000000 

 0.0000000  0.0000000  0.0000000 

Migration matrix 1 (note that migration rates have been pre-multiplied by 1000000.0000000n
 0.0000000  0.0000000  0.0000000 
 0.0000000  0.0000000  0.0000000 
 0.0000000  0.0000000  0.0000000 

Historical events
Event 0
#Time             : 1002

#Source           : 0
#Sink             : 1
#Migrants         : 1.0000000
#New size         : 1.0000000
#New growth rate  : 0.0000000
#New migr. matrix : 1
Event 1
#Time             : 10498

#Source           : 1
#Sink             : 2
#Migrants         : 1.0000000
#New size         : 1.0000000
#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: 0
No population growth detected in input file
fastsimcoal2 is building 100000 genealogies ...
Simulating 1 independent chromosomes using 12 batches and 10 threads.
MRCA time for non-recombining chromosome structure 0: 31425
Unable to compute SFS without -s option
MRCA time for non-recombining chromosome structure 0: 106400
Unable to compute SFS without -s option
MRCA time for non-recombining chromosome structure 0: 134102
Unable to compute SFS without -s option
MRCA time for non-recombining chromosome structure 0: 51026
Unable to compute SFS without -s option
MRCA time for non-recombining chromosome structure 0: 107912
Unable to compute SFS without -s option
 
[...] 
 
Genealogy # 100000/100000
Unable to compute SFS without -s option
Iteration 1/1 done in 11.255 secs
Program total execution time: 11.258 seconds

Again, the software seems to simulate 100000 arp files instead of estimating the demographic parameters, but this time with a new error-like message "Unable to compute SFS without -s option". The detailed settings and other output files are in here.

I have tried this 29491 chromosomes setting on several other models and fsc26 did produce the estimation outputs. I am not sure if I understand the chromosome parameter correctly, please correct me if I am thinking wrong.

Best,
Kung-Ping

Reply all
Reply to author
Forward
0 new messages