MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / readMClusterOutputAsMap_

Method readMClusterOutputAsMap_

src/topp/MaRaClusterAdapter.cpp:187–208  ·  view source on GitHub ↗

read and parse clustering output csv to store specnumber and clusterid associations

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 5

rowCountMethod · 0.80
getRowMethod · 0.80
atMethod · 0.80
StringClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected