Commit 77615159 authored by oshahmir's avatar oshahmir
Browse files

corrected formatting issue (#36)

parent f52bff01
......@@ -431,13 +431,13 @@ void Forest::cleanReductionWorkingData(ForestNode *aNode) {
std::ostream &operator<<(std::ostream &aOut, const Forest &aForest) {
// General forest statistics
aOut << std::endl;
aOut << "Num branches: " << std::setw(7)
aOut << "Num branches: " << std::setw(7)
<< aForest.mNumBranches << std::endl;
aOut << "Internal branches: " << std::setw(7)
aOut << "Internal branches: " << std::setw(7)
<< aForest.mNumInternalBranches << std::endl;
aOut << "Unique sites: " << std::setw(7) << aForest.mNumSites
aOut << "Unique sites: " << std::setw(7) << aForest.mNumSites
<< std::endl;
aOut << "Total branches: " << std::setw(7)
aOut << "Total branches: " << std::setw(7)
<< aForest.mNumBranches * aForest.mNumSites << std::endl;
// Count total branches on the reduced forest
......
......@@ -240,15 +240,15 @@ void Genes::readFile(const char *aFilename, bool aCleanData) {
// Print statistics
if (mVerboseLevel >= VERBOSE_INFO_OUTPUT) {
std::cout << std::endl;
std::cout << "Num. species: " << std::setw(6) << nspecies << std::endl;
std::cout << "Num. basis: " << std::setw(6) << nbasis << std::endl;
std::cout << "Valid codons: " << std::setw(6) << valid_codons << "/"
std::cout << "Num. species: " << std::setw(6) << nspecies << std::endl;
std::cout << "Num. basis: " << std::setw(6) << nbasis << std::endl;
std::cout << "Valid codons: " << std::setw(6) << valid_codons << "/"
<< ncodons << std::endl;
if (num_ambiguous)
std::cout << "Ambiguous: " << std::setw(6) << num_ambiguous << "/"
std::cout << "Ambiguous: " << std::setw(6) << num_ambiguous << "/"
<< ncodons << std::endl;
if (num_gaps)
std::cout << "Gaps removed: " << std::setw(6) << num_gaps << std::endl;
std::cout << "Gaps removed: " << std::setw(6) << num_gaps << std::endl;
}
// Prepare the mapping from program sites back to original sites
......@@ -286,12 +286,12 @@ void Genes::readFile(const char *aFilename, bool aCleanData) {
mSiteMultiplicity.erase(pend, mSiteMultiplicity.end());
if (mVerboseLevel >= VERBOSE_INFO_OUTPUT) {
std::cout << "Sites: " << std::setw(6) << mSiteMultiplicity.size()
std::cout << "Sites: " << std::setw(6) << mSiteMultiplicity.size()
<< "/" << ncodons << std::endl;
int multi_codons = static_cast<int>(
std::count_if(codon_multiplicity.begin(), codon_multiplicity.end(),
std::bind2nd(std::greater<unsigned int>(), 1)));
std::cout << "Multi codons: " << std::setw(6) << multi_codons << "/"
std::cout << "Multi codons: " << std::setw(6) << multi_codons << "/"
<< ncodons << std::endl;
std::cout << std::endl
<< "------------------------------------" << std::endl;
......
......@@ -136,17 +136,17 @@ int main(int aRgc, char **aRgv) {
std::cout << "FastCodeML V" << version << std::endl;
std::cout << "------------------------------------" << std::endl;
std::cout << std::endl;
std::cout << "Tree file: " << cmd.mTreeFile << std::endl;
std::cout << "Gene file: " << cmd.mGeneFile << std::endl;
std::cout << "Verbose level: " << cmd.mVerboseLevel << " ("
std::cout << "Tree file: " << cmd.mTreeFile << std::endl;
std::cout << "Gene file: " << cmd.mGeneFile << std::endl;
std::cout << "Verbose level: " << cmd.mVerboseLevel << " ("
<< decodeVerboseLevel(cmd.mVerboseLevel) << ')'
<< std::endl;
if (cmd.mSeed)
std::cout << "Seed: " << cmd.mSeed << std::endl;
std::cout << "Seed: " << cmd.mSeed << std::endl;
if (cmd.mBranchFromFile)
std::cout << "Branch: From tree file" << std::endl;
std::cout << "Branch: From tree file" << std::endl;
else if (cmd.mBranchAll)
std::cout << "FG Branches: All (internals + leaves) "
std::cout << "FG Branches: All (internals + leaves) "
<< std::endl;
// else if(cmd.mBranchStart != UINT_MAX && cmd.mBranchStart ==
// cmd.mBranchEnd)
......@@ -160,75 +160,75 @@ int main(int aRgc, char **aRgv) {
//<< "Branches: " << cmd.mBranchStart << '-' <<
//cmd.mBranchEnd << std::endl;
if (!cmd.mStopIfNotLRT)
std::cout << "H0 pre stop: No" << std::endl;
std::cout << "H0 pre stop: No" << std::endl;
if (cmd.mIgnoreFreq)
std::cout << "Codon freq.: Ignore" << std::endl;
std::cout << "Codon freq.: Ignore" << std::endl;
if (cmd.mDoNotReduceForest)
std::cout << "Reduce forest: Do not reduce" << std::endl;
std::cout << "Reduce forest: Do not reduce" << std::endl;
else
std::cout << "Reduce forest: Aggressive" << std::endl;
std::cout << "Reduce forest: Aggressive" << std::endl;
if (cmd.mInitH0fromH1)
std::cout << "Starting val.: From H1" << std::endl;
std::cout << "Starting val.: From H1" << std::endl;
else if (cmd.mInitFromParams && cmd.mBranchLengthsFromFile)
std::cout
<< "Starting val.: Times from tree file and params from "
<< "Starting val.: Times from tree file and params from "
"const (see below)" << std::endl;
else if (cmd.mInitFromParams)
std::cout << "Starting val.: Params from const (see below)"
std::cout << "Starting val.: Params from const (see below)"
<< std::endl;
else if (cmd.mBranchLengthsFromFile)
std::cout << "Starting val.: Times from tree file"
std::cout << "Starting val.: Times from tree file"
<< std::endl;
if (cmd.mNoMaximization)
std::cout << "Maximization: No" << std::endl;
std::cout << "Maximization: No" << std::endl;
if (cmd.mTrace)
std::cout << "Trace: On" << std::endl;
std::cout << "Trace: On" << std::endl;
if (cmd.mCleanData)
std::cout << "Clean data: On" << std::endl;
std::cout << "Clean data: On" << std::endl;
else
std::cout << "Clean data: Off" << std::endl;
std::cout << "Clean data: Off" << std::endl;
if (cmd.mGraphFile)
std::cout << "Graph file: " << cmd.mGraphFile << std::endl;
std::cout << "Graph file: " << cmd.mGraphFile << std::endl;
if (cmd.mGraphFile && cmd.mExportComputedTimes != UINT_MAX)
std::cout << "Graph times: From H" << cmd.mExportComputedTimes
std::cout << "Graph times: From H" << cmd.mExportComputedTimes
<< std::endl;
if (!cmd.mNoMaximization)
std::cout << "Optimizer: " << cmd.mOptimizationAlgo
std::cout << "Optimizer: " << cmd.mOptimizationAlgo
<< std::endl;
if (cmd.mMaxIterations != MAX_ITERATIONS)
std::cout << "Max iterations: " << cmd.mMaxIterations
std::cout << "Max iterations: " << cmd.mMaxIterations
<< std::endl;
if (cmd.mDeltaValueForGradient > 0.0)
std::cout << "Delta value: " << cmd.mDeltaValueForGradient
std::cout << "Delta value: " << cmd.mDeltaValueForGradient
<< std::endl;
std::cout << "Relative error: " << cmd.mRelativeError << std::endl;
std::cout << "Relative error: " << cmd.mRelativeError << std::endl;
if (cmd.mResultsFile)
std::cout << "Results file: " << cmd.mResultsFile
std::cout << "Results file: " << cmd.mResultsFile
<< std::endl;
if (cmd.mNumThreads)
std::cout << "Number of threads: " << cmd.mNumThreads
std::cout << "Number of threads: " << cmd.mNumThreads
<< std::endl;
if (cmd.mFixedBranchLength)
std::cout << "Branch lengths are fixed" << std::endl;
std::cout << "Branch lengths: fixed" << std::endl;
#ifdef _OPENMP
if (num_threads > 1) {
std::cout << "Current num. threads: " << num_threads << std::endl
<< "Total num. cores: " << omp_get_num_procs() << std::endl;
std::cout << "Current num. cores: " << num_threads << std::endl
<< "Total num. cores: " << omp_get_num_procs() << std::endl;
} else
#endif
{
std::cout << "Num. threads: 1 serial" << std::endl
<< "Num. cores: 1" << std::endl;
std::cout << "Current num. cores: 1 serial" << std::endl
<< "Total num. cores: 1" << std::endl;
}
#ifdef USE_MPI
if (hlc.numJobs() > 2)
std::cout << "Num. MPI proc: 1 (master) + " << hlc.numJobs() - 1
std::cout << "Num. MPI proc: 1 (master) + " << hlc.numJobs() - 1
<< " (workers)" << std::endl;
else
std::cout << "Num. MPI proc: Insufficient, single task execution"
std::cout << "Num. MPI proc: Insufficient, single task execution"
<< std::endl;
#endif
std::cout << "Compiled with: ";
std::cout << "Compiled with: ";
#ifdef _OPENMP
std::cout << "USE_OPENMP ";
#endif
......@@ -258,7 +258,7 @@ int main(int aRgc, char **aRgv) {
#endif
std::cout << std::endl << std::endl;
if (cmd.mInitFromParams) {
std::cout << "Param initial values:" << std::endl << std::endl
std::cout << "Param init. values: " << std::endl << std::endl
<< ParseParameters::getInstance();
}
}
......@@ -326,6 +326,7 @@ int main(int aRgc, char **aRgv) {
// Print the tree with the numbering of internal branches
if (cmd.mVerboseLevel >= VERBOSE_INFO_OUTPUT)
tree.printTreeAnnotated(std::cout);
std::cout<<std::endl;
// Load the forest
forest.loadTreeAndGenes(tree, msa,
......@@ -369,9 +370,7 @@ int main(int aRgc, char **aRgv) {
// Get the time needed by data preprocessing
if (cmd.mVerboseLevel >= VERBOSE_INFO_OUTPUT) {
timer.stop();
std::cout << std::endl << "TIMER (preprocessing) ncores: "
<< std::setw(2) << num_threads << " time: " << timer.get()
<< std::endl;
std::cout << std::endl << "TIMER (preproc.): " << timer.get() << " ms" << std::endl << std::endl;
}
// Print few statistics
......
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