Skip to content

Commit

Permalink
Fixed spelling mistakes in Brownie stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
jfostier committed Dec 22, 2015
1 parent 610dd56 commit 0fdfaef
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
32 changes: 15 additions & 17 deletions src/brownie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ void Brownie::parameterEstimationInStage4(DBGraph &graph){
testgraph.filterCoverage(testgraph.cutOffvalue);
testgraph.mergeSingleNodes(true);
testgraph.extractStatistic(0);
cout<<"Estimated Kmer Coverage Mean: "<<testgraph.estimatedKmerCoverage<<endl;
cout<<"Estimated Kmer Coverage STD: "<<testgraph.estimatedMKmerCoverageSTD<<endl;
cout << "Estimated Kmer coverage mean: " << testgraph.estimatedKmerCoverage << endl;
cout << "Estimated Kmer coverage std: " << testgraph.estimatedMKmerCoverageSTD << endl;

estimatedKmerCoverage=testgraph.estimatedKmerCoverage;
estimatedMKmerCoverageSTD=testgraph.estimatedMKmerCoverageSTD;
double estimatedErroneousKmerCoverage=1+estimatedKmerCoverage/100;
double e=2.718281;
double c=estimatedErroneousKmerCoverage/estimatedKmerCoverage;
cutOffvalue =(estimatedErroneousKmerCoverage-estimatedKmerCoverage)* (log(e)/log(c));
cout<<"cutOffvalue:"<<cutOffvalue<<endl;

testgraph.updateGraphSize();
testgraph.clear();
//initialize values for graph parameter based on test graph.
Expand All @@ -93,19 +93,17 @@ void Brownie::parameterEstimationInStage4(DBGraph &graph){
graph.certainVlueCov=cutOffvalue*.3;
graph.safeValueCov=cutOffvalue*.7;

cout <<"EstimatedKmerCoverage: "<<graph.estimatedKmerCoverage<<endl;
cout <<"EstimatedMKmerCoverageSTD: "<<graph.estimatedMKmerCoverageSTD<<endl;
cout <<"cutOffvalue: "<<graph.cutOffvalue<<endl;
cout <<"readLength: "<<graph.readLength<<endl;
cout <<"maxNodeSizeToDel: "<<graph.maxNodeSizeToDel<<endl;
cout <<"redLineValueCov: "<<graph.redLineValueCov<<endl;
cout <<"certainVlueCov: "<<graph.certainVlueCov<<endl;
cout <<"safeValueCov: "<<graph.safeValueCov<<endl;
cout<<"End of parameter estimation ..."<<endl;

cout << "Estimated Kmer coverage: " << graph.estimatedKmerCoverage << endl;
cout << "Estimated MKmer coverage std: " << graph.estimatedMKmerCoverageSTD << endl;
cout << "Cut-off value: " << graph.cutOffvalue << endl;
cout << "Read length: " << graph.readLength << endl;
cout << "Max node size to delete: " << graph.maxNodeSizeToDel << endl;
cout << "Red line value cov: " << graph.redLineValueCov << endl;
cout << "Certain value cov: " << graph.certainVlueCov << endl;
cout << "Safe value cov: " << graph.safeValueCov << endl;
cout << "End of parameter estimation ... " << endl;
}


void Brownie::stageOne()
{
// ============================================================
Expand Down Expand Up @@ -270,11 +268,11 @@ void Brownie::stageFour()
#ifdef DEBUG
graph.compareToSolution(getTrueMultFilename(3), false);
#endif
cout<<"graph size: "<<graph.sizeOfGraph<<endl;
cout << "Graph size: " << graph.sizeOfGraph << " bp" << endl;
graph.writeGraph(getNodeFilename(4),getArcFilename(4),getMetaDataFilename(4));
cout<<"N50 is: "<<graph.n50<<endl;
cout << " Graph correction completed in "
<< Util::stopChrono() << "s." << endl;
cout << "Graph correction completed in "
<< Util::stopChrono() << "s." << endl;
Util::startChrono();

#ifdef DEBUG
Expand Down
4 changes: 2 additions & 2 deletions src/bubble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ bool DBGraph::bubbleDetection(int depth) {
for (NodeID lID = -numNodes; lID <numNodes; lID++) {
if (lID % OUTPUT_FREQUENCY == 0)
(cout << "Extracting node -" <<numNodes<< "/ "<<lID<<" /"<<numNodes
<< " from graph.\r").flush();
<< " from graph \r").flush();
if ( lID == 0 )
continue;
SSNode node = getSSNode(lID);
Expand Down Expand Up @@ -474,7 +474,7 @@ bool DBGraph::bubbleDetection(int depth) {
cout<<"Specificity: ("<<100*((double)TN/(double)(TN+FP))<<"%)"<<endl;
#endif
if (numOfDel>0)
cout<<"number of deleted nodes based on bubble detection: "<<numOfDel<<endl;
cout << "Number of deleted nodes based on bubble detection: " << numOfDel << endl;
if (numOfDel !=0)
return true;
return false;
Expand Down
13 changes: 6 additions & 7 deletions src/coverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ bool DBGraph::deleteExtraAttachedNodes(){
for ( NodeID lID =-numNodes; lID <= numNodes; lID++ ) {
if (lID % OUTPUT_FREQUENCY == 0)
(cout << "Extracting node -" <<numNodes<< "/ "<<lID<<" /"<<numNodes
<< " from graph.\r").flush();
<< " from graph \r").flush();
if (lID==0)
continue;
SSNode node = getSSNode ( lID );
Expand Down Expand Up @@ -364,7 +364,7 @@ bool DBGraph::deleteExtraAttachedNodes(){
}
cout<<endl;
if (numOfDel>0)
cout<<"number of deleted nodes in deleteExtraAttachedNodes: "<<numOfDel<<endl;
cout << "Number of deleted nodes in deleteExtraAttachedNodes: " << numOfDel << endl;
#ifdef DEBUG
cout<< "TP: "<<tp<<" TN: "<<tn<<" FP: "<<fp<<" FN: "<<fn<<endl;
cout << "Sensitivity: ("<<100*((double)tp/(double)(tp+fn))<<"%)"<<endl;
Expand Down Expand Up @@ -435,7 +435,7 @@ bool DBGraph::connectSameMulNodes(){
}

if (numOfDel>0)
cout<<"number of deleted nodes in connectSameMulNodes: "<<numOfDel<<endl;
cout << "Number of deleted nodes in connectSameMulNodes: " << numOfDel << endl;
#ifdef DEBUG
cout<<endl<<"second FP: "<<secondFP<<endl;
cout<<"second TP: "<<secondTP<<endl;
Expand Down Expand Up @@ -707,9 +707,9 @@ double DBGraph::estimateReadStartCoverage ( const ReadLibrary &input,
*/
bool DBGraph::filterCoverage(float cutOff)
{
cout <<endl<< " ================== Filter Coverage ==================" << endl;
cout << endl << " ================== Coverage Filter ==================" << endl;

cout<<"CutOff value for removing nodes is: "<<cutOff<<endl;
cout << "Cut-off value for removing nodes: " << cutOff << endl;
int tp=0;
int tn=0;
int fp=0;
Expand Down Expand Up @@ -749,7 +749,7 @@ bool DBGraph::filterCoverage(float cutOff)
#endif
}
}
cout << "Number nodes deleted base on coverage: " << numFiltered<<endl;
cout << "Number of nodes deleted based on coverage: " << numFiltered<<endl;
#ifdef DEBUG
cout << " Gain value is ("<<100*((double)(tp-fp)/(double)(tp+fn))<< "%)"<<endl;
cout<< "TP: "<<tp<<" TN: "<<tn<<" FP: "<<fp<<" FN: "<<fn<<endl;
Expand All @@ -758,7 +758,6 @@ bool DBGraph::filterCoverage(float cutOff)
#endif

return numFiltered > 0;

}

/**
Expand Down
12 changes: 6 additions & 6 deletions src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ void DBGraph::graphPurification(string trueMultFilename,
updateCutOffValue(round);
compareToSolution(trueMultFilename, false);
#endif
cout <<endl<< " ================= Bubble Detection ==================" << endl;
cout << endl << " ================= Bubble Detection ==================" << endl;
bubble= bubbleDetection(depth);
mergeSingleNodes(true);
bool continuEdit=true;
size_t maxDepth=(round)*increamentDepth>maxBubbleDepth?maxBubbleDepth:(round)*increamentDepth;
while(depth<maxDepth&& continuEdit){
depth=depth+increamentDepth;
cout<<"bubble depth: "<<depth <<endl;
cout << "Bubble depth: " << depth << endl;
continuEdit= bubbleDetection(depth);
if (continuEdit)
mergeSingleNodes(true);
Expand All @@ -117,7 +117,7 @@ void DBGraph::graphPurification(string trueMultFilename,
updateCutOffValue(round);
#endif
extractStatistic(round);
cout <<endl<< " ========== Delete Unreliable Nodes starts ===========" << endl;
cout << endl << " ============= Delete Unreliable Nodes ==============" << endl;
bool deleted=deleteUnreliableNodes();
mergeSingleNodes(true);
continuEdit=deleted;
Expand Down Expand Up @@ -232,9 +232,9 @@ void DBGraph::updateCutOffValue(int round)

this->updateCutOffValueRound++;

cout<<"certainValue: "<<this->certainVlueCov<<endl;
cout<<"safeValue: "<<this->safeValueCov<<endl;
cout<<"redLineValue: "<<this->redLineValueCov<<endl;
cout << "Certain value: " << this->certainVlueCov << endl;
cout << "Safe value: " << this->safeValueCov << endl;
cout << "Red line value: " << this->redLineValueCov << endl;
}
void DBGraph::plotCovDiagram(vector<pair< pair< int , int> , pair<double,int> > >& frequencyArray){

Expand Down

0 comments on commit 0fdfaef

Please sign in to comment.