3 #ifndef SCAFFOLDING_TYPEDEFS_HPP
4 #define SCAFFOLDING_TYPEDEFS_HPP
8 #include <initializer_list>
9 #include <boost/graph/properties.hpp>
12 #include "utils/graph_typedefs.hpp"
17 #define NO_WEIGHT UINT_MAX
18 #define NO_LENGTH INT_MIN
19 #define CYCLIC_SEQUENCE_INDICATOR "(c)"
20 #define REVERSE_SEQUENCE_INDICATOR "(rev)"
22 #define BASES "ABCDEFGHIJKLMNOPQRSTUVWXYZ*-"
26 #warning WARNING: by default, the complement of Adenine is Thymine, not Uracil! But both U & T will be complemented by A.
28 const char* COMPLEMENTARY_BASES =
"ATAUCGRYMK";
33 void reverse_complement_inplace(std::string&);
38 VertexName start_vertex;
42 sequence(os.sequence), start_vertex(os.start_vertex) {}
43 OrientedSequence(
const std::string& _sequence,
const std::string& _start = VertexName()):
44 sequence(_sequence), start_vertex(_start) {}
47 void reverse_complement(
const VertexName& new_start_vertex = VertexName())
49 start_vertex = new_start_vertex;
50 reverse_complement_inplace(sequence);
58 using OrientedSequence::OrientedSequence;
65 typedef boost::unordered_map<std::string, OrientedSequence> SequenceMap;
66 typedef std::list<std::pair<std::string, std::string> > NamedSequenceList;
75 name = std::to_string(index);
81 return os << info.index;
83 return os << info.name;
87 unsigned weight = NO_WEIGHT;
88 int length = NO_LENGTH;
89 unsigned multiplicity = 1;
90 std::string contig_name;
93 ScafEdgeProperty(
const unsigned _weight,
const int _length,
const unsigned _multi,
const std::string& _contig_name =
""):
94 weight(_weight), length(_length), multiplicity(_multi), contig_name(_contig_name) {}
96 weight(ep.weight), length(ep.length), multiplicity(ep.multiplicity), contig_name(ep.contig_name) {}
99 bool is_matching_edge()
const
101 return (weight == NO_WEIGHT);
104 friend std::ostream& operator<<(std::ostream& os,
const ScafEdgeProperty& info)
106 return os <<
"w: "<< info.weight <<
" l: " << info.length <<
" m: " << info.multiplicity <<
" c: '" << info.contig_name<<
"'";
111 unsigned insert_size;
112 unsigned standard_deviation;
116 typedef boost::adjacency_list<
125 typedef Vertex<RawScaffoldGraph> ScafVertex;
126 typedef VertexSet<RawScaffoldGraph> ScafVertexSet;
127 typedef VertexPair<RawScaffoldGraph> ScafVertexPair;
128 typedef VertexPairList<RawScaffoldGraph> ScafVertexPairList;
129 typedef VertexPairSet<RawScaffoldGraph> ScafVertexPairSet;
130 typedef VPairDependencyMap<RawScaffoldGraph> ScafVPairDependencyMap;
131 typedef VertexIter<RawScaffoldGraph> ScafVIter;
132 typedef VertexIterRange<RawScaffoldGraph> ScafVIterRange;
133 typedef AdjIter<RawScaffoldGraph> ScafAdjIter;
134 typedef AdjIterRange<RawScaffoldGraph> ScafAdjIterRange;
136 typedef typename boost::property_map<RawScaffoldGraph, unsigned ScafVertexProperty::*>::type ScafVIndexMap;
137 typedef typename boost::property_map<RawScaffoldGraph, unsigned ScafVertexProperty::*>::const_type cScafVIndexMap;
139 typedef Edge<RawScaffoldGraph> ScafEdge;
140 typedef EdgeSet<RawScaffoldGraph> ScafEdgeSet;
141 typedef EdgeList<RawScaffoldGraph> ScafEdgeList;
142 typedef EdgeIter<RawScaffoldGraph> ScafEdgeIter;
143 typedef EdgeIterRange<RawScaffoldGraph> ScafEdgeIterRange;
144 typedef OEdgeIter<RawScaffoldGraph> ScafOEdgeIter;
145 typedef OEdgeIterRange<RawScaffoldGraph> ScafOEdgeIterRange;
146 typedef IEdgeIter<RawScaffoldGraph> ScafIEdgeIter;
147 typedef IEdgeIterRange<RawScaffoldGraph> ScafIEdgeIterRange;
149 typedef Matching<RawScaffoldGraph> ScafMatching;
150 typedef std::list<ScafEdge> AlternatingPath;
151 typedef boost::unordered_map<ScafVertexPair, ScafVertexPairSet> ScafJumpMap;
156 const ScafEdge contig;
157 std::list<ScafEdge> path;
159 contig_jump(
const ScafEdge& _contig,
const std::initializer_list<ScafEdge>& L):
Definition: scaffolding_typedefs.hpp:55
Definition: read_adj_list.hpp:22
Definition: scaffolding_typedefs.hpp:36
Definition: scaffolding_typedefs.hpp:110
Definition: scaffolding_typedefs.hpp:68
Definition: scaffolding_typedefs.hpp:155
Definition: scaffolding_typedefs.hpp:86