ProteoWizard
RunSummary.hpp
Go to the documentation of this file.
1 //
2 // $Id$
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 
MSDataAnalyzer.hpp
pwiz::analysis::analyzer_strings
This auxilliary class should be specialized for MSDataAnalyzers whose instantiation is controlled by ...
Definition: MSDataAnalyzer.hpp:115
pwiz::msdata::SpectrumIdentity
Identifying information for a spectrum.
Definition: MSData.hpp:470
MSDataCache.hpp
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::analysis::TabularConfig
Definition: TabularConfig.hpp:38
TABULARCONFIG_DELIMITER_USAGE_STR
#define TABULARCONFIG_DELIMITER_USAGE_STR
Definition: TabularConfig.hpp:31
pwiz::analysis::RunSummary::Config::msLevels
pwiz::util::IntegerSet msLevels
Definition: RunSummary.hpp:45
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
TabularConfig.hpp
Export.hpp
pwiz::analysis::RunSummary::config_
const Config config_
Definition: RunSummary.hpp:64
pwiz::analysis::RunSummary
writes table of spectrum metadata to a file
Definition: RunSummary.hpp:39
pwiz::analysis::analyzer_strings< RunSummary >::argsUsage
static std::vector< std::string > argsUsage()
Definition: RunSummary.hpp:74
pwiz::analysis::MSDataCache
simple memory cache for common MSData info
Definition: MSDataCache.hpp:74
pwiz::analysis::analyzer_strings< RunSummary >::argsFormat
static const char * argsFormat()
Definition: RunSummary.hpp:73
TABULARCONFIG_DELIMITER_OPTIONS_STR
#define TABULARCONFIG_DELIMITER_OPTIONS_STR
Definition: TabularConfig.hpp:30
pwiz::analysis::RunSummary::cache_
const MSDataCache & cache_
Definition: RunSummary.hpp:63
pwiz::analysis::RunSummary::Config::charges
pwiz::util::IntegerSet charges
Definition: RunSummary.hpp:46
pwiz::analysis::analyzer_strings< RunSummary >::id
static const char * id()
Definition: RunSummary.hpp:71
pwiz::analysis::RunSummary::Config
Definition: RunSummary.hpp:43
pwiz::analysis::MSDataAnalyzer
Interface for MSData analyzers.
Definition: MSDataAnalyzer.hpp:60
IntegerSet.hpp
pwiz::analysis::MSDataAnalyzer::DataInfo
information about the data to be analyzed
Definition: MSDataAnalyzer.hpp:65
pwiz::util::IntegerSet
a virtual container of integers, accessible via an iterator interface, stored as union of intervals
Definition: IntegerSet.hpp:37
pwiz::analysis::analyzer_strings< RunSummary >::description
static const char * description()
Definition: RunSummary.hpp:72