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

Method getMSRunSpectrumIdentifierType_

src/openms/source/FORMAT/MzTab.cpp:1974–1990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1972 }
1973
1974 MzTabParameter MzTab::getMSRunSpectrumIdentifierType_(const vector<const PeptideIdentification*>& peptide_ids)
1975 {
1976 MzTabParameter p;
1977 p.fromCellString("[MS,MS:1001530,mzML unique identifier,]");
1978 for (const auto& pid : peptide_ids)
1979 {
1980 String spec_ref = pid->getMetaValue("spectrum_reference", "");
1981 // note: don't change order as some may contain the other terms as well. Taken from mzTab specification document
1982 if (spec_ref.hasSubstring("controllerNumber=")) { p.fromCellString("[MS,MS:1000768,Thermo nativeID format,]"); return p; }
1983 if (spec_ref.hasSubstring("process=")) { p.fromCellString("[MS,MS:1000769,Waters nativeID format,]"); return p; }
1984 if (spec_ref.hasSubstring("cycle=")) { p.fromCellString("[MS,MS:1000770,WIFF nativeID format,]"); return p; }
1985 if (spec_ref.hasSubstring("scan=")) { p.fromCellString("[MS,MS:1000776,scan number only nativeID format,]"); return p; }
1986 if (spec_ref.hasSubstring("spectrum=")) { p.fromCellString("[MS,MS:1000777,spectrum identifier nativeID format,]"); return p; }
1987 return p;
1988 }
1989 return p;
1990 }
1991
1992 MzTab::IDMzTabStream::IDMzTabStream(
1993 const std::vector<const ProteinIdentification*>& prot_ids,

Callers

nothing calls this directly

Calls 3

getMetaValueMethod · 0.80
hasSubstringMethod · 0.80
fromCellStringMethod · 0.45

Tested by

no test coverage detected