Scaffolding  0.1
This program can assemble genome scaffolds using the pairing information in paired-end reads.
branching.hpp
1 
2 #ifndef BRANCHING_HPP
3 #define BRANCHING_HPP
4 
5 namespace scaffold { namespace solv {
6  enum BranchType { DeleteBranch, TakeBranch };
7 
8  struct Branch {
9  const BranchType btype;
10  std::list<ScafVertexPair> edges;
11 
12  Branch(const BranchType& t) : btype(t) {}
13  Branch(const BranchType& t, const ScafVertexPair& p) : btype(t), edges(1, p) {}
14  Branch(const BranchType& t, const ScafEdge& e, const RawScaffoldGraph& g) : btype(t), edges(1, ScafVertexPair(source(e, g), target(e,g))) {}
15  };
16 
17  }// namespace
18 
19  typedef std::pair<solv::Branch&, RawScaffoldGraph&> BranchAndGraph;
20  std::ostream& operator<<(std::ostream& os, const BranchAndGraph& b){
21  switch(b.first.btype){
22  case scaffold::solv::DeleteBranch:
23  os << "Dele:";
24  break;
25  case scaffold::solv::TakeBranch:
26  os << "Take:";
27  break;
28  } // switch
29  return os << VertexPairListAndGraph<RawScaffoldGraph>(b.first.edges,b.second);
30  }
31 
32 
33 }};
34 
35 #endif
36 
Definition: read_adj_list.hpp:22
Definition: branching.hpp:8