Skip to content

Commit

Permalink
Merge pull request #1276 from veg/develop
Browse files Browse the repository at this point in the history
2.5.28
  • Loading branch information
spond authored Feb 16, 2021
2 parents 927e226 + 462a9a6 commit c6e3c83
Show file tree
Hide file tree
Showing 31 changed files with 380 additions and 166 deletions.
12 changes: 4 additions & 8 deletions res/TemplateBatchFiles/Distances/JC69
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
function InitializeDistances (dummy)
{
summingVector = {4,1}["1"];
return 0;
function InitializeDistances (dummy) {
}

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DIST_OPTION);
totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
function ComputeDistanceFormula (s1,s2) {
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalSitesCompared = +siteDifferenceCount;

if (totalSitesCompared)
{
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/K2P
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/K2P_RV
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];

if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/Modified_Nei_Gojobori
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function ComputeDistanceFormula (s1,s2)
_SITE_OS_COUNT = {stateCharCount,stateCharCount};
_SITE_ON_COUNT = {stateCharCount,stateCharCount};

GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

_SITE_OS_COUNT = matrixTrick2*(_OBSERVED_S_$siteDifferenceCount)*Transpose(matrixTrick2);
_SITE_ON_COUNT = matrixTrick2*(_OBSERVED_NS_$siteDifferenceCount)*Transpose(matrixTrick2);
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/Nei_Gojobori
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function ComputeDistanceFormula (s1,s2)
_SITE_OS_COUNT = {stateCharCount,stateCharCount};
_SITE_ON_COUNT = {stateCharCount,stateCharCount};

GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

_SITE_OS_COUNT = matrixTrick2*(_OBSERVED_S_$siteDifferenceCount)*Transpose(matrixTrick2);
_SITE_ON_COUNT = matrixTrick2*(_OBSERVED_NS_$siteDifferenceCount)*Transpose(matrixTrick2);
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/PC
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector));
totalDifference = Transpose(summingVector)*(siteDifferenceCount$tracingVector*summingVector);

Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/PC_MH
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalDifference = Transpose(summingVector)*(siteDifferenceCount$tracingVector*summingVector);
totalSitesCompared = Transpose(summingVector)*(siteDifferenceCount*summingVector);
totalDifference = totalDifference[0]/totalSitesCompared[0];
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/PC_RV
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalDifference = Transpose(summingVector)*(siteDifferenceCount$tracingVector*summingVector);
totalSitesCompared = Transpose(summingVector)*(siteDifferenceCount*summingVector);
return _distance_alpha*((totalDifference[0]/totalSitesCompared[0])^(-1/_distance_alpha)-1);
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/T3P
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/TN84
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/TN93
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function InitializeDistances (void)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DEFAULT);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/TN93_RV
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);

totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/p_Distance
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
{
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/p_Distance_aa
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalDifference = Transpose(summingVector)*(siteDifferenceCount$tracingVector*summingVector);
totalSitesCompared = Transpose(summingVector)*(siteDifferenceCount*summingVector);
return 1-totalDifference[0]/totalSitesCompared[0];
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/p_Distance_binary
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function InitializeDistances (dummy)

function ComputeDistanceFormula (s1,s2)
{
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);
totalSitesCompared = (Transpose(summingVector)*(siteDifferenceCount*summingVector))[0];
if (totalSitesCompared)
{
Expand Down
2 changes: 1 addition & 1 deletion res/TemplateBatchFiles/Distances/p_Distance_codon
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function ComputeDistanceFormula (s1,s2)
{
_SITE_ON_COUNT = {stateCharCount,stateCharCount};

GetDataInfo (siteDifferenceCount, filteredData, s1, s2, DISTANCE_AMBIG_OPTION);
GetDataInfo (siteDifferenceCount, filteredData, s1, s2, RESOLVE_AMBIGUITIES);


if (distChoice == 0)
Expand Down
Loading

0 comments on commit c6e3c83

Please sign in to comment.