From dcbf9a3a331f2567ed0f7c5ad8b2e94064eee94d Mon Sep 17 00:00:00 2001 From: Qi Yuan <84579116+qyuan71@users.noreply.github.com> Date: Fri, 5 Nov 2021 17:58:52 +0000 Subject: [PATCH 1/2] Correct class type of prob: int to void --- sstmap/_sstmap_probable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sstmap/_sstmap_probable.cpp b/sstmap/_sstmap_probable.cpp index 17136aa..3e7b0ac 100644 --- a/sstmap/_sstmap_probable.cpp +++ b/sstmap/_sstmap_probable.cpp @@ -21,7 +21,7 @@ using namespace std; } #endif -int prob(string infile, string outfile) { +void prob(string infile, string outfile) { /* if (argc <= 1) { cerr << "\nUSAGE:\n\n" From a1f0f4e82c880e1ff9bfc9aefae186b40f7c0b5b Mon Sep 17 00:00:00 2001 From: Qi Yuan <84579116+qyuan71@users.noreply.github.com> Date: Fri, 5 Nov 2021 18:02:25 +0000 Subject: [PATCH 2/2] Correct trans entropy calculation Avoid hard coded 10000 in the translational entropy calculation. --- sstmap/kdhsa102.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sstmap/kdhsa102.cpp b/sstmap/kdhsa102.cpp index 925a3e2..e917e29 100644 --- a/sstmap/kdhsa102.cpp +++ b/sstmap/kdhsa102.cpp @@ -572,10 +572,10 @@ double kdtree::run_tree_trans(std::vector &cls) { double R = 8.314472; double pi = 3.14159265359; - int fcount = 10000; + //int fcount = 10000; for (int i = 0; i < numvals; i++) { - gd += log((0.0329223149*fcount*4*pi*pow(dh[i], 3))/3); + gd += log((0.0329223149*numvals*4*pi*pow(dh[i], 3))/3); } s = R*T*0.239*(gd/numvals + 0.5772156649)/1000;