MCPcopy Create free account
hub / github.com/BirolLab/abyss / storeContigs

Function storeContigs

RResolver/Contigs.cpp:147–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void
148storeContigs(const std::string& contigsPath)
149{
150 if (opt::verbose) {
151 std::cerr << "Storing contigs to `" << contigsPath << "'...\n";
152 }
153 std::ofstream fout(contigsPath.c_str());
154 assert_good(fout, contigsPath);
155
156 Graph::vertex_iterator vertexStart, vertexEnd;
157 boost::tie(vertexStart, vertexEnd) = vertices(g_contigGraph);
158 for (auto it = vertexStart; it != vertexEnd; ++it) {
159 auto node = *it;
160 if (!get(vertex_removed, g_contigGraph, node) && !node.sense()) {
161 FastaRecord rec;
162
163 std::stringstream ss;
164 ss << get(vertex_name, g_contigGraph, node);
165 std::string name = ss.str();
166
167 rec.id = name.substr(0, name.size() - 1);
168 rec.comment = getContigComment(node);
169 rec.seq = getContigSequence(node);
170
171 fout << rec;
172 }
173 }
174 assert_good(fout, contigsPath);
175 if (opt::verbose) {
176 std::cerr << "Contigs stored.\n";
177 }
178}
179
180unsigned
181numVerticesRemoved(const Graph& graph)

Callers 1

writeResultsFunction · 0.85

Calls 7

assert_goodFunction · 0.85
senseMethod · 0.80
verticesFunction · 0.50
getFunction · 0.50
c_strMethod · 0.45
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected