Processes branches that are in progress, removing those that have * completed. * @return the number of contigs and k-mer assembled */
| 1286 | * @return the number of contigs and k-mer assembled |
| 1287 | */ |
| 1288 | pair<size_t, size_t> NetworkSequenceCollection:: |
| 1289 | processBranchesAssembly(FastaWriter* fileWriter, unsigned currContigID) |
| 1290 | { |
| 1291 | size_t assembledContigs = 0, assembledKmer = 0; |
| 1292 | for (BranchGroupMap::iterator it = m_activeBranchGroups.begin(); |
| 1293 | it != m_activeBranchGroups.end();) { |
| 1294 | if (!it->second.isActive()) { |
| 1295 | assert(it->second.size() == 1); |
| 1296 | BranchRecord& branch = it->second[0]; |
| 1297 | assert(branch.getState() == BS_NOEXT |
| 1298 | || branch.getState() == BS_AMBI_SAME |
| 1299 | || branch.getState() == BS_AMBI_OPP); |
| 1300 | if ((opt::ss && branch.getDirection() == SENSE) |
| 1301 | || (!opt::ss && branch.isCanonical())) { |
| 1302 | assembledContigs++; |
| 1303 | assembledKmer += branch.size(); |
| 1304 | assembleContig(fileWriter, branch, |
| 1305 | m_numAssembled + currContigID++); |
| 1306 | } |
| 1307 | m_activeBranchGroups.erase(it++); |
| 1308 | } else |
| 1309 | ++it; |
| 1310 | } |
| 1311 | return make_pair(assembledContigs, assembledKmer); |
| 1312 | } |
| 1313 | |
| 1314 | /** Send a request for the edges of vertex kmer. */ |
| 1315 | void NetworkSequenceCollection::generateExtensionRequest( |
nothing calls this directly
no test coverage detected