From 51ccd55dad9ce1bb21e8ea6eedc54a8b66a3962e Mon Sep 17 00:00:00 2001 From: Cong Date: Sun, 22 Apr 2018 09:04:08 -0400 Subject: [PATCH] update stdout log --- src/main.cpp | 49 +++++++------------------------------------------ 1 file changed, 7 insertions(+), 42 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2e982b6..2cd61f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,6 +15,9 @@ See LICENSE for licensing. using namespace std; int main(int argc, char* argv[]){ + time_t CurrentTime; + string CurrentTimeStr; + bool success=parse_arguments(argc, argv); if(success){ @@ -65,47 +68,9 @@ int main(int argc, char* argv[]){ OutputNewGenome(SegmentGraph, Components, RefSequence, RefName, Output_Prefix+"_genome.fa"); } - /*sort(SegmentGraph.vEdges.begin(), SegmentGraph.vEdges.end(), [](Edge_t a, Edge_t b){return a.Weight>b.Weight;}); - ofstream output3(Output_Prefix+"_discordantedges.txt", ios::out); - output3<<"# "; - for(int i=0; iConcord_Dist_Pos && ind2-ind1>20) || SegmentGraph.vEdges[i].Head1!=false || SegmentGraph.vEdges[i].Head2!=true){ - bool flag=false; - pair pos1=Node_NewChr[SegmentGraph.vEdges[i].Ind1], pos2=Node_NewChr[SegmentGraph.vEdges[i].Ind2]; - if(pos1.first==pos2.first && pos1.second0)) - flag=true; - else if(pos1.first==pos2.first && pos1.second>pos2.second && SegmentGraph.vEdges[i].Head2==(Components[pos2.first][pos2.second]<0) && SegmentGraph.vEdges[i].Head1==(Components[pos1.first][pos1.second]>0)) - flag=true; - if(flag){ - map > >::iterator itmap=ExactBP.find(SegmentGraph.vEdges[i]); - vector< pair > BP; - if(itmap==ExactBP.end() || itmap->second.size()==0){ - int bp1,bp2; - bp1=(SegmentGraph.vEdges[i].Head1?SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind1].Position:(SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind1].Position+SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind1].Length)); - bp2=(SegmentGraph.vEdges[i].Head2?SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind2].Position:(SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind2].Position+SegmentGraph.vNodes[SegmentGraph.vEdges[i].Ind2].Length)); - BP.push_back(make_pair(bp1,bp2)); - } - else - BP=itmap->second; - for(int k=0; k