Skip to content

Commit d9f11ea

Browse files
committed
added a very small pseudocount for dealing with all-missing columns in site empirical frequencies
1 parent 84c2508 commit d9f11ea

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sources/SiteSpecificProfileProcess.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ double SiteSpecificProfileProcess::GetStatEnt(int k) {
7979
}
8080
if (isnan(total)) {
8181
cerr << "entropy is nan\n";
82+
for (int i=0; i<GetDim(); i++) {
83+
cerr << profile[k][i] << '\n';
84+
}
8285
exit(1);
8386
}
8487
return total;
@@ -120,12 +123,12 @@ void SiteSpecificProfileProcess::SetSiteProfiles() {
120123
double* tmp = new double[GetDim()];
121124
for (int i=0; i<GetNsite(); i++) {
122125
// for (int i=GetSiteMin(); i<GetSiteMax(); i++) {
123-
if (ActiveSite(i)) {
124-
GetSiteEmpiricalFreq(i,tmp,0);
126+
// if (ActiveSite(i)) {
127+
GetSiteEmpiricalFreq(i,tmp,0.0001);
125128
for (int l=0; l<GetDim(); l++) {
126129
profile[i][l] = tmp[l] + pseudocount*glob[l];
127130
}
128-
}
131+
// }
129132
}
130133
delete[] tmp;
131134
RenormalizeProfiles();

0 commit comments

Comments
 (0)