OpenMS
Loading...
Searching...
No Matches
PercolatorInfile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
15#include <vector>
16
17namespace OpenMS
18{
19
24 class OPENMS_DLLAPI PercolatorInfile
25 {
26 public:
27 static void store(const String& pin_file,
28 const PeptideIdentificationList& peptide_ids,
29 const StringList& feature_set,
30 const std::string& enz,
31 int min_charge,
32 int max_charge);
33
34
62 static PeptideIdentificationList load(const String& pin_file,
63 bool higher_score_better,
64 const String& score_name,
65 const StringList& extra_scores,
66 StringList& filenames,
67 String decoy_prefix = "",
68 double threshold = 0.01,
69 bool SageAnnotation = false);
70
71 // uses spectrum_reference, if empty uses spectrum_id, if also empty fall back to using index
72 static String getScanIdentifier(const PeptideIdentification& pid, size_t index);
73
74 protected:
75
76 //id <tab> label <tab> scannr <tab> calcmass <tab> expmass <tab> feature1 <tab> ... <tab> featureN <tab> peptide <tab> proteinId1 <tab> .. <tab> proteinIdM
78 const PeptideIdentificationList& peptide_ids,
79 const StringList& feature_set,
80 const std::string& enz,
81 int min_charge,
82 int max_charge);
83
84 static bool isEnz_(const char& n, const char& c, const std::string& enz);
85
86 static Size countEnzymatic_(const String& peptide, const std::string& enz);
87
88 };
89} // namespace OpenMS
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Represents the set of candidates (SpectrumMatches) identified for a single precursor spectrum.
Definition PeptideIdentification.h:64
Class for storing Percolator tab-delimited input files.
Definition PercolatorInfile.h:25
static String getScanIdentifier(const PeptideIdentification &pid, size_t index)
static TextFile preparePin_(const PeptideIdentificationList &peptide_ids, const StringList &feature_set, const std::string &enz, int min_charge, int max_charge)
static bool isEnz_(const char &n, const char &c, const std::string &enz)
static Size countEnzymatic_(const String &peptide, const std::string &enz)
static PeptideIdentificationList load(const String &pin_file, bool higher_score_better, const String &score_name, const StringList &extra_scores, StringList &filenames, String decoy_prefix="", double threshold=0.01, bool SageAnnotation=false)
Loads peptide identifications from a Percolator input file.
static void store(const String &pin_file, const PeptideIdentificationList &peptide_ids, const StringList &feature_set, const std::string &enz, int min_charge, int max_charge)
A more convenient string class.
Definition String.h:34
Definition TextFile.h:21
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19