Read contig lengths. */
| 887 | |
| 888 | /** Read contig lengths. */ |
| 889 | static Lengths |
| 890 | readContigLengths(istream& in) |
| 891 | { |
| 892 | assert(in); |
| 893 | assert(g_contigNames.empty()); |
| 894 | Lengths lengths; |
| 895 | string s; |
| 896 | unsigned len; |
| 897 | while (in >> s >> len) { |
| 898 | in.ignore(numeric_limits<streamsize>::max(), '\n'); |
| 899 | put(g_contigNames, lengths.size(), s); |
| 900 | assert(len >= opt::k); |
| 901 | lengths.push_back(len - opt::k + 1); |
| 902 | } |
| 903 | assert(in.eof()); |
| 904 | assert(!lengths.empty()); |
| 905 | g_contigNames.lock(); |
| 906 | return lengths; |
| 907 | } |
| 908 | |
| 909 | /** Read contig lengths. */ |
| 910 | static Lengths |