/usr/share/hyphy/TemplateBatchFiles/MFPSreader.def is in hyphy-common 2.2.7+dfsg-1.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | SetDialogPrompt ("Please select the file with subset lengths:");
errorHeader = "\n\n************ ERROR **************\n";
fscanf (PROMPT_FOR_FILE,"Number",thisLine);
counter = 0;
while (1)
{
if (END_OF_FILE)
{
break;
}
fscanf (LAST_FILE_PATH,"Number",thisLine);
if (thisLine>0)
{
counter = counter+1;
}
}
if (counter==0)
{
fprintf (stdout, errorHeader, "At least 1 data subset must be present in the index file.\n");
return;
}
fprintf (stdout,"\n>There are ",counter, " subsets specified in the index file.\n\n");
partitionLengths = {counter,1};
partitionTrees = {counter,1};
counter = 0;
expectedTipCounter = 0;
fscanf (LAST_FILE_PATH,"Number",thisLine);
while (1)
{
if (END_OF_FILE)
{
break;
}
if (thisLine>0)
{
partitionLengths[counter] = thisLine;
expectedTipCounter = expectedTipCounter+thisLine;
counter = counter+1;
fprintf (stdout,"\tSubset ",counter, " has ", thisLine, " sequences.\n");
}
fscanf (LAST_FILE_PATH,"Number",thisLine);
}
SetDialogPrompt ("Please select a codon data file:");
DataSet ds = ReadDataFile (PROMPT_FOR_FILE);
DataSetFilter filteredData = CreateFilter (ds,3,"","",GeneticCodeExclusions);
if (ds.species!=expectedTipCounter)
{
fprintf (stdout, errorHeader, "The number of expected and actual sequences do not match (Read ",ds.species," sequences; expected ",expectedTipCounter, " sequences).");
return;
}
fprintf (stdout, "\n\n>Data\n\n",ds);
SetDialogPrompt ("Please select the file with trees:");
thisLine = "subsetTree0";
fscanf (PROMPT_FOR_FILE,"Tree",thisLine&);
PATHTOTREEFILE = LAST_FILE_PATH;
counter = 1;
fprintf (stdout, "\n\n>Trees\n\n");
while (1)
{
if (END_OF_FILE)
{
break;
}
fprintf(stdout,"\n\tTree ",counter," ", thisLine&);
ExecuteCommands ("partitionTrees[counter-1]:=\"\"+"+thisLine+";");
ExecuteCommands ("tipCount = tipCount+TipCount("+thisLine+");");
thisLine = "subsetTree"+counter;
fscanf (LAST_FILE_PATH,"Tree",thisLine&);
counter = counter+1;
}
if (counter-1!=Rows(partitionLengths))
{
fprintf (stdout, errorHeader, "The number of trees and data subsets do not match (Read ",counter-1," trees).");
return;
}
if (tipCount!=expectedTipCounter)
{
fprintf (stdout, errorHeader, "The total number of trees leaves and sequences do not match (Read ",tipCount," leaves and ",expectedTipCounter, " sequences).");
return;
}
numberOfSubsets = Rows (partitionLengths);
|