This file is indexed.

/usr/share/hyphy/TemplateBatchFiles/dSdNTreeTools.ibf 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
function  ComputeScalingStencils (unused)
{
	scalingStencils = {};
	
	if (Columns(_Genetic_Code) != 64) {
		fprintf (stdout, "\nError: _Genetic_Code is not properly defined\n");
	}
	else
	{
		nonStopCodonCount = 64;
		for (k=0; k<64; k=k+1)
		{
			if (_Genetic_Code[k] == 10)
			{
				nonStopCodonCount = nonStopCodonCount - 1;
			}
		}

		stencilMatrixNS = {nonStopCodonCount,nonStopCodonCount};
		stencilMatrixS  = {nonStopCodonCount,nonStopCodonCount};

		hshift = 0;
		for (h=0; h<64; h=h+1)
		{
			if (_Genetic_Code[h]==10) 
			{
				hshift = hshift+1;
				continue; 
			}
			vshift = hshift;
			for (v = h+1; v<64; v=v+1)
			{
				if (_Genetic_Code[v]==10) 
				{
					vshift = vshift+1;
					continue; 
				}
				if (_Genetic_Code[h] == _Genetic_Code[v])
				{
					stencilMatrixS [h-hshift][v-vshift] = 1;
					stencilMatrixS [v-vshift][h-hshift] = 1;
				}
				else
				{
					stencilMatrixNS [h-hshift][v-vshift] = 1;
					stencilMatrixNS [v-vshift][h-hshift] = 1;		
				}
			}
		}
		scalingStencils ["Syn"]     = stencilMatrixS;
		scalingStencils ["NonSyn"]  = stencilMatrixNS;
	}
	return scalingStencils;
}

/*----------------------------------------------------------------------------------*/

function  ReturnSandNSTrees (theStencil, treeID)
{
	scaledTreeStrings = {};
	BRANCH_LENGTH_STENCIL = theStencil["Syn"];
	ExecuteCommands("scaledTreeStrings[\"Syn\"] = Format ("+treeID+", 1, 1);");

	BRANCH_LENGTH_STENCIL = theStencil["NonSyn"];
	ExecuteCommands("scaledTreeStrings[\"NonSyn\"] = Format ("+treeID+", 1, 1);");
	
	BRANCH_LENGTH_STENCIL = 0;
	return scaledTreeStrings;
}

/*----------------------------------------------------------------------------------*/

function  ReturnVectorsOfCodonLengths (theStencil, treeID)
{
	scaledVectors = {};
	BRANCH_LENGTH_STENCIL = theStencil["Syn"];
	ExecuteCommands("scaledVectors[\"Syn\"] = BranchLength ("+treeID+", -1);");

	BRANCH_LENGTH_STENCIL = theStencil["NonSyn"];
	ExecuteCommands("scaledVectors[\"NonSyn\"] = BranchLength ("+treeID+", -1);");
	
	BRANCH_LENGTH_STENCIL = 0;
	ExecuteCommands("scaledVectors[\"Total\"] = BranchLength ("+treeID+", -1);");
	return scaledVectors;
}

/*----------------------------------------------------------------------------------*/

function  ReturnCodonFormulas (theStencil, modelID)
{
	scaledVectors = {};
	BRANCH_LENGTH_STENCIL = theStencil["Syn"];
	ExecuteCommands("GetString(_synFormula,`modelID`,-1);");

	BRANCH_LENGTH_STENCIL = theStencil["NonSyn"];
	ExecuteCommands("GetString(_nonSynFormula,`modelID`,-1);");
	
	BRANCH_LENGTH_STENCIL = 0;
	scaledVectors ["Syn"] = _synFormula;
	scaledVectors ["NonSyn"] = _nonSynFormula;
	
	return scaledVectors;
}