read and parse clustering output csv to store specnumber and clusterid associations
| 185 | |
| 186 | // read and parse clustering output csv to store specnumber and clusterid associations |
| 187 | void readMClusterOutputAsMap_(String mcout_file, std::map<MaRaClusterResult, Int>& specid_to_clusterid_map, const std::map<String, Int>& filename_to_idx_map) |
| 188 | { |
| 189 | CsvFile csv_file(mcout_file, '\t'); |
| 190 | StringList row; |
| 191 | Int clusterid = 0; |
| 192 | |
| 193 | for (Size i = 0; i < csv_file.rowCount(); ++i) |
| 194 | { |
| 195 | csv_file.getRow(i, row); |
| 196 | if (!row.empty()) |
| 197 | { |
| 198 | row[0] = String(filename_to_idx_map.at(row[0])); |
| 199 | |
| 200 | MaRaClusterResult res(row); |
| 201 | specid_to_clusterid_map[res] = clusterid; |
| 202 | } |
| 203 | else |
| 204 | { |
| 205 | ++clusterid; |
| 206 | } |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | // replace with PercolatorAdapter function |
| 211 | String getScanIdentifier_(vector<PeptideIdentification>::iterator it, vector<PeptideIdentification>::iterator start) |