| 105 | } |
| 106 | |
| 107 | void |
| 108 | loadContigs(const std::string& contigsPath) |
| 109 | { |
| 110 | if (opt::verbose) |
| 111 | std::cerr << "Loading contigs from `" << contigsPath << "'...\n"; |
| 112 | FastaReader in(contigsPath.c_str(), FastaReader::NO_FOLD_CASE); |
| 113 | for (FastaRecord rec; in >> rec;) { |
| 114 | if (g_contigNames.count(rec.id) == 0) |
| 115 | continue; |
| 116 | assert(g_contigSequences.size() / 2 == get(g_contigNames, rec.id)); |
| 117 | g_contigComments.push_back(rec.comment); |
| 118 | g_contigSequences.push_back(rec.seq); |
| 119 | g_contigSequences.push_back(reverseComplement(rec.seq)); |
| 120 | } |
| 121 | assert(in.eof()); |
| 122 | assert(!g_contigSequences.empty()); |
| 123 | opt::colourSpace = isdigit(g_contigSequences.front()[0]); |
| 124 | if (opt::verbose) { |
| 125 | std::cerr << "Contigs loaded.\n"; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | void |
| 130 | storeContigGraph( |