/usr/share/hyphy/UserAddins/SimulateFromLF is in hyphy-common 2.2.6+dfsg-3build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | _ChooseCaption = "Simulate from this likelihood function:";
#include "Includes/ChooseALF.ibf";
if (tIndex>=0)
{
simCounter = 0;
while (simCounter<1)
{
fprintf (stdout,"\nHow many simulants should be generated (>=1)?");
fscanf (stdin,"Number", simCounter);
}
GetString (tName, LikelihoodFunction, tIndex);
SetDialogPrompt ("Save files to:");
fprintf (PROMPT_FOR_FILE,CLEAR_FILE);
pathPrefix = LAST_FILE_PATH;
for (k=0; k<simCounter; k=k+1)
{
ExecuteCommands ("DataSet _sData = SimulateDataSet("+tName+");");
DataSetFilter _sFilter = CreateFilter (_sData,1);
outFile = pathPrefix + "." + k;
fprintf (outFile,CLEAR_FILE,_sFilter);
}
}
|