Error! Unable to open multiSFS file "../no_gene_flow_MSFS.obs"

490 views
Skip to first unread message

Tiamiyu Bashir

unread,
Jun 22, 2021, 11:00:00 AM6/22/21
to fastsimcoal
Hi,
I tried running the program for one of my models, "no gene flow" and I got this error, kindly help on how to resolve this. 

Thanks,

fastsimcoal was invoked with the following command line arguments:
/fsc27_linux64/fsc2702 -t no_gene_flow.tpl -e no_gene_flow.est -n 10000 -C 10 -M -L 40 -c 20 -B 20 -m --multiSFS 
Reading parameter settings file /public/home/WHC_BBT/FastSimCoal/no_gene_flow/no_gene_flow.est...

WARNING: The [RULES] section is not supported (or read) since version 2.7.
         All rules defined in this section will be ignored

done reading parameter settings file!

Random generator seed : 460027

Deme sizes
Deme 0 9797
Deme 1 756740


Sample sizes
Deme 0 102
Deme 1 22

Sample ages
Deme 0 0
Deme 1 0

Growth rates
Deme 0 0
Deme 1 0


Historical events
Event 0

#Time              : 25986948
#Source            : 0
#Sink              : 1
#Migrants          : 1
#New relative size : 99.0086
#New growth rate   : 0
#New migr. matrix  : 0


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.0000000070   
   Output expected MAF spectrum
   Do not output expected DAF spectrum

No population growth detected in input file

Estimating model parameters using 20 batches and 20 threads

Error! Unable to open multiSFS file "../no_gene_flow_MSFS.obs"
TSimSettings::performBrenMinimization: Unable to read observed SFS and to estimate parameters ...

Tiamiyu Bashir

unread,
Jun 22, 2021, 11:02:51 AM6/22/21
to fastsimcoal
//Parameters for the coalescence simulation program : fastsimcoal2.exe
2 samples to simulate :
//Population effective sizes (number of genes)
China
Japan
//Samples sizes and samples age
102
22
//Growth rates  : negative growth implies population expansion
0
0
//Number of migration matrices : 0 implies no migration between demes
0
//historical event: time, source, sink, migrants, new deme size, new growth rate, migration matrix index
1  historical events
Ta 0 1 1 RSANC 0 0
//Number of independent loci [chromosome]
1 0
//Per chromosome: Number of contiguous linkage Block: a block is a set of contiguous loci
1
//per Block:data type, number of loci, per generation recombination and mutation rates and optional parameters
FREQ  1  0  7e-9 OUTEXP

// Search ranges and rules file
// ****************************

[PARAMETERS]
//#isInt? #name   #dist. #min  #max
//all Ns are in number of haploid individuals
1  China logunif  100   1e6 output
1  Japan logunif  100   1e6 output
0  RSANC logunif  0.1   100 output
0  TPROP logunif  0.01  1 output
1  Ta logunif  1000  3e7 output

[RULES]

[COMPLEX PARAMETERS]
1  Tb = Ta * TPROP output

Laurent Excoffier

unread,
Jun 22, 2021, 11:36:20 AM6/22/21
to fastsimcoal
Hi,

The message is pretty clear... it did not find the SFS file  no_gene_flow_MSFS.obs, which is needed to perform parameter inference from the folded SFS

best

laurent

Tiamiyu Bashir

unread,
Jun 24, 2021, 9:41:40 PM6/24/21
to fastsimcoal
I have the SFS file in the model folder, with same name. If there's a way to point fsc using the path to sfs file, this could solve the problem. I have attached the model folder, as well as a screenshot of my terminal.

Kindly have a look at the attached.
Thanks,
BashirMSFS files in the model folder.PNG
no_geneflow.zip

Chrystelle Delord

unread,
Jul 2, 2021, 1:50:38 AM7/2/21
to fastsimcoal
Dear Bashir,

Not sure if this could help you, but I am pretty sure this happened to me in the past and was apparently resulting from a weird issue with the PATH indeed.
Moving the input files .tpl, .est and .obs in the same directory as the fsc.exe excutable solved the issue.

Also there are two empty lines at the end of your MSFS .obs file, maybe this might explain some issues?

Cheers,

Chrys

Tiamiyu Bashir

unread,
Jul 2, 2021, 9:56:09 AM7/2/21
to fastsimcoal

Hi  Chrys,
Thanks for the insight, I will try it out as suggested. With regards to the empty lines, are you referring to the zeros? Maybe because the two populations are of different sizes. One is 17 and the other 77. Do you suggest I delete the zeros?

Thank you!
Bashir

Chrystelle Delord

unread,
Jul 2, 2021, 10:42:22 AM7/2/21
to fastsimcoal
Dear Bashir,

Oh, I did not see this, actually yes, I think samples sizes in the .tpl and .obs file should be the same.
However, I was able to run your model in my computer anyway so apparently this is not what caused the .obs file issue.

Empty lines were apparently not the problem either (I could run your model as well).
(By empty line I was not referring to zeros, just to the two return carriages at Lines 4 and 5 after the SFS entries.)

This leaves us with the path issue. I hope you will be able to find a solution, or that what I suggested will work.

Good luck!!

Chrys

mirandabs

unread,
Aug 30, 2023, 8:34:34 AM8/30/23
to fastsimcoal2
Hi all,

I'm replying to this thread because I think this is the same issue. I am currently running this command: ./fsc2709 -n 10 -m --multiSFS -t N_ANC.tpl -e N_ANC.est -M -L40

From this directory ( ls prints:  N_ANC N_ANC.est N_ANC.params N_ANC.tpl N_ANC_MSFS.obs fsc2709 seed.txt)

But I don't obtain any likelihood estimate files (only n .arp files, .arb, .simparam and .par). I've tried lots of different combinations and orders in the command line, but I think this may be an issue with the MSFS.obs file not being 'detected' as others have stated. 

Has anyone else had this issue or been able to solve it?

Thanks,

Miranda

mirandabs

unread,
Sep 11, 2023, 10:32:58 AM9/11/23
to fastsimcoal2
Hi all,

This was fixed for me by using the following command instead: ./fsc2709 -n 10 -m -u -t N_ANC.tpl -e N_ANC.est -M

 Also, I had stated that I had stated that there was only one historical event in my .tpl file when I in fact had two. 

Hope this helps other people who may have this issue. 
Reply all
Reply to author
Forward
0 new messages