ProteoWizard
RunSummary.hpp
Go to the documentation of this file.
1 //
2 // $Id: RunSummary.hpp 7297 2015-03-12 05:30:33Z paragmallick $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers <a.t> vanderbilt.edu>
6 //
7 // Copyright 2010 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
23 #ifndef _RUNSUMMARY_HPP_
24 #define _RUNSUMMARY_HPP_
25 
26 
28 #include "MSDataAnalyzer.hpp"
29 #include "MSDataCache.hpp"
30 #include "TabularConfig.hpp"
32 
33 
34 namespace pwiz {
35 namespace analysis {
36 
37 
38 /// writes table of spectrum metadata to a file
40 {
41  public:
42 
44  {
47 
48  Config(const std::string& args = "");
49  };
50 
51 
52  RunSummary(const MSDataCache& cache, const Config& config);
53 
54  /// \name MSDataAnalyzer interface
55  //@{
56  virtual UpdateRequest updateRequested(const DataInfo& dataInfo,
57  const SpectrumIdentity& spectrumIdentity) const;
58 
59  virtual void close(const DataInfo& dataInfo);
60  //@}
61 
62  private:
64  const Config config_;
65 };
66 
67 
68 template<>
70 {
71  static const char* id() {return "run_summary";}
72  static const char* description() {return "print summary statistics about a run";}
73  static const char* argsFormat() {return "[msLevels=<int_set>] [charges=<int_set>] [" TABULARCONFIG_DELIMITER_OPTIONS_STR "]";}
74  static std::vector<std::string> argsUsage()
75  {
76  std::vector<std::string> result;
77  result.push_back("msLevels: if specified, summary only operates on these MS levels; default is all MS levels");
78  result.push_back("charges: if specified, summary only operates on these charge states; default is all charges");
79  result.push_back(TABULARCONFIG_DELIMITER_USAGE_STR);
80  return result;
81  }
82 };
83 
84 
85 } // namespace analysis
86 } // namespace pwiz
87 
88 
89 #endif // _RUNSUMMARY_HPP_
90 
simple memory cache for common MSData info
Definition: MSDataCache.hpp:74
writes table of spectrum metadata to a file
Definition: RunSummary.hpp:39
a virtual container of integers, accessible via an iterator interface, stored as union of intervals ...
Definition: IntegerSet.hpp:37
const MSDataCache & cache_
Definition: RunSummary.hpp:63
static std::vector< std::string > argsUsage()
Definition: RunSummary.hpp:74
#define TABULARCONFIG_DELIMITER_USAGE_STR
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::util::IntegerSet charges
Definition: RunSummary.hpp:46
This auxilliary class should be specialized for MSDataAnalyzers whose instantiation is controlled by ...
Identifying information for a spectrum.
Definition: MSData.hpp:469
#define TABULARCONFIG_DELIMITER_OPTIONS_STR
pwiz::util::IntegerSet msLevels
Definition: RunSummary.hpp:45
information about the data to be analyzed
Interface for MSData analyzers.