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

Method readPoutAsMap_

src/topp/PercolatorAdapter.cpp:358–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356 }
357
358 void readPoutAsMap_(const String& pout_file, std::map<String, PercolatorResult>& pep_map)
359 {
360 CsvFile csv_file(pout_file, '\t');
361 StringList row;
362
363 for (Size i = 1; i < csv_file.rowCount(); ++i)
364 {
365 csv_file.getRow(i, row);
366 PercolatorResult res(row);
367 // note: Since we create our pin file in a way that the SpecID (=PSMId) is composed of filename + spectrum native id
368 // this will be passed through Percolator and we use it again to read it back in.
369 String spec_ref = res.PSMId + res.peptide;
370 writeDebug_("PSM identifier in pout file: " + spec_ref, 10);
371
372 // retain only the best result in the unlikely case that a PSMId+peptide combination occurs multiple times
373 if (pep_map.find(spec_ref) == pep_map.end())
374 {
375 pep_map.insert( map<String, PercolatorResult>::value_type ( spec_ref, res ) );
376 }
377 }
378 }
379
380 /// We only read the q-value for protein groups since Percolator has a more elaborate FDR estimation.
381 /// For proteins we add q-value as main score and PEP as metavalue.

Callers

nothing calls this directly

Calls 5

rowCountMethod · 0.80
getRowMethod · 0.80
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected