Commit d5169286 authored by oshahmir's avatar oshahmir
Browse files

removing debug statements

parent 3f7c0f9f
......@@ -590,11 +590,11 @@ double MfgBayesTest::getGridParams(const std::vector<double> &aVars,
// codeml.c is: log(1e-80);
// debug
if (site==982)
std::cout<<"before normalization mPriors[site] for cat " << iw << " is "<< mPriors[iw * mNumSites + site] << std::endl;
//if (site==982)
//std::cout<<"before normalization mPriors[site] for cat " << iw << " is "<< mPriors[iw * mNumSites + site] << std::endl;
// debug
if (site==982)
std::cout<<"likeliohoods[site] for cat " << iw << " is " << likelihoods[site] << std::endl;
//if (site==982)
//std::cout<<"likeliohoods[site] for cat " << iw << " is " << likelihoods[site] << std::endl;
}
......@@ -616,8 +616,8 @@ double MfgBayesTest::getGridParams(const std::vector<double> &aVars,
mPriors[k * mNumSites + site] = exp(mPriors[k * mNumSites + site] - fh);
// debug
if (site==982)
std::cout<<"mPriors[site] for cat " << k << " is "<< mPriors[k * mNumSites + site] << std::endl;
//if (site==982)
//std::cout<<"mPriors[site] for cat " << k << " is "<< mPriors[k * mNumSites + site] << std::endl;
}
scale += fh * aSiteMultiplicity[site];
......@@ -839,7 +839,7 @@ void MfgBayesTest::computeBEB(const std::vector<double> &aVars,
<< "Calculating f(w|X), posterior probs of site classes."
<< std::endl;
//debug
std::cout << "mNumSites: " << mNumSites << std::endl;
//std::cout << "mNumSites: " << mNumSites << std::endl;
for (unsigned int site = 0; site < mNumSites; ++site) {
scale1 = -1e300;
......@@ -878,10 +878,10 @@ void MfgBayesTest::computeBEB(const std::vector<double> &aVars,
mSiteClassProb[j * mNumSites + site] *= exp(scale1 - fX);
//debug
if (site==982)
{
std::cout << "scale (t=log(fhk[codon_class]) + lnfXs[igrid]): " << scale1 << " fX: " << fX << " site multiplicity " << site_multiplicity[site] <<" prob: " << mSiteClassProb[2 * mNumSites + site] + mSiteClassProb[3 * mNumSites + site] << std::endl;
}
//if (site==982)
//{
//std::cout << "scale (t=log(fhk[codon_class]) + lnfXs[igrid]): " << scale1 << " fX: " << fX << " site multiplicity " << site_multiplicity[site] <<" prob: " << mSiteClassProb[2 * mNumSites + site] + mSiteClassProb[3 * mNumSites + site] << std::endl;
//}
}
......@@ -931,7 +931,7 @@ void MfgBayesTest::printPositiveSelSites(std::set<int> aFgBranchSet) const {
probs.push_back(prob);
++current_idx;
//debug
std::cout<< "idx: " << current_idx-1 << " prob: " << prob << " site: " << site << std::endl;
//std::cout<< "idx: " << current_idx-1 << " prob: " << prob << " site: " << site << std::endl;
}
}
}
......@@ -955,8 +955,8 @@ void MfgBayesTest::printPositiveSelSites(std::set<int> aFgBranchSet) const {
std::cout << std::setw(6) << im->first + 1 << ' ' << std::fixed
<< std::setprecision(6) << prob << sig << std::endl;
//debug
if (im->first+1 == 1030)
std::cout<<"reduced site num for 1030: "<<im->second<<std::endl;
//if (im->first+1 == 1030)
//std::cout<<"reduced site num for 1030: "<<im->second<<std::endl;
}
......
......@@ -374,6 +374,9 @@ void BranchSiteModel::initFromResult(const std::vector<double> &aPreviousResult,
// Adjust the length to be copied
if (aValidLen == 0)
aValidLen = static_cast<unsigned int>(aPreviousResult.size());
//debug
//std::cout <<"aValidLen: " << aValidLen <<" mNumVariables "<<mNumVariables<< std::endl;
if (mFixedBranchLength) {
// Too long, cut. Too short, ignore. Remember H0 has 4 variables.
......@@ -385,11 +388,25 @@ void BranchSiteModel::initFromResult(const std::vector<double> &aPreviousResult,
} else if (aValidLen < 4)
aValidLen = 0;
//debug
for (std::vector<double>::const_iterator i = aPreviousResult.begin(); i != aPreviousResult.end(); ++i)
std::cout << *i << ' ';
// Copy the requested values
mVar.assign(aPreviousResult.begin(),
aPreviousResult.begin() + static_cast<size_t>(aValidLen));
//debug
//for (std::vector<double>::const_iterator i = mVar.begin(); i != mVar.end(); ++i)
//std::cout << *i << ' ';
mVar.resize(static_cast<size_t>(mNumVariables));
} else {
//debug
//for (std::vector<double>::const_iterator i = mVar.begin(); i != mVar.end(); ++i)
//std::cout << *i << ' ';
}
else {
// Too long, cut. Too short, ignore. Remember H0 has 4 variables.
if (aValidLen > mNumTimes + mNumVariables)
aValidLen = mNumTimes + mNumVariables;
......
......@@ -71,7 +71,7 @@ if(USE_OPENMP)
endif(USE_OPENMP)
# Search for MPI
# Search for MPI (could be removed ?)
if(USE_MPI)
if(BUILD_SEARCH_MPI)
find_package(MPI)
......@@ -84,7 +84,7 @@ endif(USE_MPI)
# Load the needed paths
set(LINK_DIR_BLAS $ENV{BLAS_LIB_DIR} CACHE PATH "BLAS lib dir")
set(LINK_DIR_LAPACK $ENV{LAPACK_LIB_DIR} CACHE PATH "LAPACK lib dir")
set(INCLUDE_DIR_MKL $ENV{MKL_INCLUDE_DIR} CACHE PATH "MKL include dir")
set(INCLUDE_DIR_MKL $ENV{MKL_INCLUDE_DIR} CACHE PATH "MKL include dir") # could be removed ?
set(INCLUDE_DIR_NLOPT $ENV{NLOPT_INCLUDE_DIR} CACHE PATH "NLopt include dir")
set(LINK_DIR_NLOPT $ENV{NLOPT_LIB_DIR} CACHE PATH "NLopt lib dir")
set(MATH_LIB_NAMES $ENV{MATH_LIB_NAMES} CACHE STRING "Math libraries (Separated by ';')")
......@@ -112,11 +112,11 @@ if(USE_LAPACK)
add_definitions(-DUSE_LAPACK)
endif(USE_LAPACK)
if(MPI_FOUND)
if(MPI_FOUND) # could be removed ?
add_definitions(-DUSE_MPI)
endif(MPI_FOUND)
if(USE_ORIGINAL_PROPORTIONS)
if(USE_ORIGINAL_PROPORTIONS) # could be removed ?
add_definitions(-DUSE_ORIGINAL_PROPORTIONS)
endif(USE_ORIGINAL_PROPORTIONS)
......
......@@ -156,6 +156,11 @@ int Ming2::ming2(FILE *fout, double *f, double x[], const double xl[],
}
// double f0 = *f = (*fun) (x, n); ++mNumFunCall;
//debug
for (int i=0;i < 100; i++)
printf("x[%d]=%f - ", i,x[i]);
double f0 = *f = -mModel->computeLikelihood(x, n, mTraceFun);
xtoy(x, x0, n);
double sizep = 99.;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment