Description
Dear Eric,
I found a small problem in .fscCollectParams
. I wanted to keep stable growth in a population that is a sink for another population. The thing is I wanted fastsimcoal to estimate this parameter while using the same parameter name between blocks is not allowed by .fscCollectParams
. The error is as follows:
Error in .fscCollectParams(p) : Can't have duplicated parameter names.
I have tested it on the tpl file in fastsimcoal and the program works and substitutes the value with the same random number in par file. Of course one can define another growth parameter but as you know, overparametrisation is an enemy of decent modeling. Perhaps, you could change the check to allow for the same names used for the same parameters, I guess it applies only to growth that can be defined in demes and perhaps a time of an event which could be the same as a time of deme sampling, or migration if it is previously named in the migration matrix (gives the same error message; although, I cannot imagine any situation where this functionality could be useful ;).
In my case it is:
demes <- fscSettingsDemes(fscDeme("NFL",15,0,0,"GFL"),
fscDeme("ND34",15,0,0,"GD34"),#3
fscDeme("NPL",15,0,0, "GPL"), #4
and
events <- fscSettingsEvents(
fscEvent("TPL", 2, 1, 1, 1, "GD34", 0), ...
where "GD34" is a problem.
By the way, I think there is a mistake in the manual for the fastsimcoal use in the strataG. It says in the 'events' section: "growth.rate
gives a new growth rate for the source deme" while fsc manual says it is a sink deme that is affected.