ProteoWizard
Classes | Typedefs | Functions | Variables
pwiz::analysis Namespace Reference

Classes

struct  analyzer_strings
 This auxilliary class should be specialized for MSDataAnalyzers whose instantiation is controlled by user-supplied strings (via command line, config file, etc.). More...
 
struct  analyzer_strings< MetadataReporter >
 
struct  analyzer_strings< RegionSIC >
 
struct  analyzer_strings< RegionSlice >
 
struct  analyzer_strings< RegionTIC >
 
struct  analyzer_strings< RunSummary >
 
struct  analyzer_strings< SpectrumBinaryData >
 
struct  analyzer_strings< SpectrumTable >
 
struct  ChromatogramDataFilter
 
class  CubicHermiteSpline
 An implementation of the IInterpolation interface that acts as a wrapper for a cSpline. More...
 
struct  CwtPeakDetector
 
class  DemuxDebugReader
 A class for reading demux matrices from file. More...
 
class  DemuxDebugWriter
 A class for writing demux matrices to file. More...
 
class  DemuxSolver
 Interface for solver that can be used for demultiplexing. More...
 
struct  DemuxWindow
 A container for describing the isolation windows that are dedicated to columns of the design matrix for demultiplexing. More...
 
struct  ExtraZeroSamplesFilter
 removes (most) zero samples in signal profiles, except those flanking nonzero samples simply looks for runs of 0 values, removes all but start and end of run More...
 
class  FeatureDetector
 
class  FeatureDetectorPeakel
 FeatureDetectorPeakel implements a 'template method', delegating to 'strategies' encapsulated by the following interfaces: PeakExtractor PeakelGrower PeakelPicker. More...
 
class  FeatureDetectorSimple
 FeatureDetectorSimple detects 'rectangular' features, ie number of peaks in isotope envelope is the same for each scan included in the feature. More...
 
class  FeatureModeler
 interface for fitting and scoring Feature data to a model More...
 
class  FeatureModeler_Gaussian
 Gaussian implementation. More...
 
class  IDemultiplexer
 Interface for calculating demultiplexing scheme. More...
 
class  IPrecursorMaskCodec
 Interface for generating and accessing precursor masks for a demultiplexing scheme. More...
 
struct  IsolationWindow
 A container that wraps DemuxWindow to preserve the full precision window boundaries. More...
 
class  IsoWindowHasher
 A method of hashing an isolation window to a unique long value mz is and m/z of a unique point in the isolation window, such as the lower bound, upper bound, or center. More...
 
struct  LocalMaximumPeakDetector
 
class  MatrixIO
 Provides static methods for writing and reading matrices to/from files. More...
 
class  MetadataReporter
 writes file-level metadata to a file More...
 
struct  MS2Deisotoper
 
struct  MS2NoiseFilter
 
class  MSDataAnalyzer
 Interface for MSData analyzers. More...
 
class  MSDataAnalyzerContainer
 container of MSDataAnalyzer (composite pattern) More...
 
class  MSDataAnalyzerDriver
 event generator for MSDataAnalyzer More...
 
class  MSDataCache
 simple memory cache for common MSData info More...
 
class  MSXDemultiplexer
 Implementation of the IDemultiplexer interface that is able to handle both MSX experiments, including ones with overlap. More...
 
struct  MZRTField
 MZRTField is a std::set of boost::shared_ptrs, stored as a binary tree ordered by LessThan_MZRT. More...
 
class  NNLSSolver
 Implementation of the DemuxSolver interface as a non-negative least squares (NNLS) problem. More...
 
struct  Noise
 
class  NoiseCalculator
 
class  NoiseCalculator_2Pass
 
class  NoVendorPeakPickingException
 
class  OverlapDemultiplexer
 Implementation of the IDemultiplexer interface that is able to handle overlap experiments. More...
 
struct  Peak
 represents some generic metadata about a peak detected in a signal More...
 
struct  PeakDetector
 
class  PeakelGrower
 interface for growing Peakels More...
 
class  PeakelGrower_Proximity
 simple PeakelGrower implementation, based on proximity of Peaks More...
 
class  PeakelPicker
 interface for picking Peakels and arranging into Features; note: Peakels are actually removed from the PeakelField More...
 
class  PeakelPicker_Basic
 basic implementation More...
 
class  PeakExtractor
 Class for extracting Peak objects from an array of ordered pairs; in design pattern lingo, this is a "template method" delegating peak finding and peak fitting to "strategies". More...
 
class  PeakFamilyDetector
 interface for peak family (isotope envelope) detection More...
 
class  PeakFamilyDetectorFT
 FT-specific implementation of PeakFamilyDetector. More...
 
class  PeakFinder
 interface for finding peaks in an array of ordered pairs More...
 
class  PeakFinder_SNR
 PeakFinder implementation based on signal-to-noise ratio. More...
 
class  PeakFitter
 interface for fitting peaks in an array of ordered pairs More...
 
class  PeakFitter_Parabola
 PeakFitter implementation based on fitting a parabola. More...
 
class  PepxmlRecordReader
 
class  PrecursorMaskCodec
 Implementation of the IPrecursorMaskCodec interface that is able to handle both overlapping MSX experiments. More...
 
struct  PrecursorMassFilter
 
class  PrecursorRecalculator
 
class  PrecursorRecalculatorDefault
 
class  ProteinList_DecoyGenerator
 ProteinList decoy generator for creating decoy proteins on the fly. More...
 
class  ProteinList_DecoyGeneratorPredicate_Reversed
 creates a reversed copy of every target protein with the specified decoy string prefixed to the id More...
 
class  ProteinList_DecoyGeneratorPredicate_Shuffled
 creates a randomly shuffled copy of every target protein with the specified decoy string prefixed to the id More...
 
class  ProteinList_Filter
 ProteinList filter, for creating Protein sub-lists. More...
 
class  ProteinList_FilterPredicate_IdSet
 
class  ProteinList_FilterPredicate_IndexSet
 
class  ProteinListFactory
 Factory for instantiating and wrapping ProteinLists. More...
 
class  RegionAnalyzer
 analyzes a rectangular region of m/z-time space More...
 
class  RegionSIC
 writes data samples from a single rectangular region More...
 
class  RegionSlice
 writes data samples from a single rectangular region More...
 
class  RegionTIC
 writes data samples from a single rectangular region More...
 
struct  RTMatches_Any
 predicate always returns true More...
 
struct  RTMatches_Contains
 predicate returns true iff the object's retention time range contains the specified retention time More...
 
struct  RTMatches_IsContainedIn
 predicate returns true iff the object's retention time range is completely contained within the range of the specified reference object, up to the specified tolerance More...
 
class  RunSummary
 writes table of spectrum metadata to a file More...
 
struct  SavitzkyGolaySmoother
 
struct  Smoother
 interface for a one-dimensional smoothing algorithm More...
 
class  SpectrumBinaryData
 writes table of spectrum metadata to a file More...
 
struct  SpectrumDataFilter
 
class  SpectrumList_3D
 SpectrumList implementation that can create 3D spectra of ion mobility drift time and m/z. More...
 
class  SpectrumList_ChargeFromIsotope
 SpectrumList implementation that assigns (probable) charge states to tandem mass spectra. More...
 
class  SpectrumList_ChargeStateCalculator
 SpectrumList implementation that assigns (probable) charge states to tandem mass spectra. More...
 
class  SpectrumList_Demux
 SpectrumList decorator implementation that can demultiplex spectra of several precursor windows acquired in the same scan. More...
 
class  SpectrumList_Filter
 SpectrumList filter, for creating Spectrum sub-lists. More...
 
class  SpectrumList_FilterPredicate_ActivationType
 
class  SpectrumList_FilterPredicate_AnalyzerType
 
class  SpectrumList_FilterPredicate_ChargeStateSet
 
class  SpectrumList_FilterPredicate_DefaultArrayLengthSet
 
class  SpectrumList_FilterPredicate_IndexSet
 
class  SpectrumList_FilterPredicate_MSLevelSet
 
class  SpectrumList_FilterPredicate_MzPresent
 
class  SpectrumList_FilterPredicate_Polarity
 
class  SpectrumList_FilterPredicate_PrecursorMzSet
 
class  SpectrumList_FilterPredicate_ScanEventSet
 
class  SpectrumList_FilterPredicate_ScanNumberSet
 
class  SpectrumList_FilterPredicate_ScanTimeRange
 
class  SpectrumList_IonMobility
 SpectrumList implementation that provides access to vendor-specific ion mobility functions. More...
 
class  SpectrumList_LockmassRefiner
 SpectrumList implementation to replace peak profiles with picked peaks. More...
 
class  SpectrumList_MetadataFixer
 SpectrumList implementation to add (or replace) base peak and total ion metadata with new values calculated from the current binary data. More...
 
class  SpectrumList_MZRefiner
 
class  SpectrumList_MZWindow
 SpectrumList filter, for creating Spectrum sub-lists. More...
 
class  SpectrumList_PeakFilter
 SpectrumList implementation that returns spectra with the specified SpectrumDataFilter operation applied. More...
 
class  SpectrumList_PeakPicker
 SpectrumList implementation to replace peak profiles with picked peaks. More...
 
class  SpectrumList_PrecursorRecalculator
 SpectrumList wrapper that recalculates precursor info on spectrum() requests. More...
 
class  SpectrumList_PrecursorRefine
 SpectrumList wrapper that recalculates precursor info on spectrum() requests. More...
 
class  SpectrumList_ScanSummer
 Provides a custom-sorted spectrum list. More...
 
class  SpectrumList_Smoother
 SpectrumList implementation to return smoothed spectral data. More...
 
class  SpectrumList_Sorter
 Provides a custom-sorted spectrum list. More...
 
class  SpectrumList_SorterPredicate_ScanStartTime
 
class  SpectrumList_TitleMaker
 SpectrumList implementation to add (or replace) a spectrum title to each spectrum according to a user-specified format. More...
 
class  SpectrumList_ZeroSamplesFilter
 SpectrumList implementation to return spectra with or without extra zero samples. More...
 
class  SpectrumListFactory
 Factory for instantiating and wrapping SpectrumLists. More...
 
class  SpectrumPeakExtractor
 Extracts sets of centroided peaks from spectra using a user-defined list of peaks to extract. More...
 
class  SpectrumTable
 writes table of spectrum metadata to a file More...
 
struct  TabularConfig
 
struct  ThresholdFilter
 
struct  Version
 
struct  WhittakerSmoother
 
struct  ZeroSampleFiller
 fills in missing zero samples around signal profiles More...
 

Typedefs

typedef boost::shared_ptr< SpectrumDataFilterSpectrumDataFilterPtr
 
typedef boost::shared_ptr< ChromatogramDataFilterChromatogramDataFilterPtr
 
typedef boost::shared_ptr< PeakDetectorPeakDetectorPtr
 
typedef boost::shared_ptr< SmootherSmootherPtr
 
typedef boost::tokenizer< boost::char_separator< char > > ScanIdTokenizer
 Tool for pulling each scan id attribute and its value from a scan id. More...
 
typedef uint64_t MZHash
 
typedef boost::shared_ptr< MSDataAnalyzerMSDataAnalyzerPtr
 
typedef MZRTField< pwiz::data::peakdata::PeakelPeakelField
 
typedef MZRTField< pwiz::data::peakdata::FeatureFeatureField
 
typedef boost::container::flat_map< double, boost::container::flat_map< double, float > > Spectrum3D
 
typedef boost::shared_ptr< Spectrum3DSpectrum3DPtr
 
typedef SpectrumList_Demux::Params::Optimization DemuxOptimization
 

Functions

template<typename T >
const std::string & enumToString (T e, std::map< T, std::string > m)
 Converts an enum to it's corresponding string in a prebuilt map. More...
 
template<typename T >
stringToEnum (const std::string &s, std::map< T, std::string > m)
 Converts a string to it's corresponding enum in a prebuilt map. More...
 
bool TryGetScanIDToken (const msdata::SpectrumIdentity &spectrumIdentity, const std::string &tokenName, std::string &value)
 Tries to read the given token from a spectrum identity id. More...
 
bool TryGetDemuxIndex (const msdata::SpectrumIdentity &spectrumIdentity, size_t &index)
 Tries to read the index of the demultiplexed spectrum relative to the multiplexed spectrum it was derived from. More...
 
bool TryGetOriginalIndex (const msdata::SpectrumIdentity &spectrumIdentity, size_t &index)
 Tries to read the original index of the spectrum before demultiplexing using the SpectrumIdentity of a (demultiplexed) spectrum. More...
 
bool TryGetMSLevel (const msdata::Spectrum &spectrum, int &msLevel)
 Tries to read MS level from spectrum. More...
 
bool TryGetNumPrecursors (const msdata::Spectrum &spectrum, int &numPrecursors)
 Tries to get the number of precursors contributing to a multiplexed spectrum. More...
 
bool TryGetStartTime (const msdata::Spectrum &spectrum, double &startTime)
 Tries to get the start time of the scan. More...
 
bool FindNearbySpectra (std::vector< size_t > &spectraIndices, pwiz::msdata::SpectrumList_const_ptr slPtr, size_t centerIndex, size_t numSpectraToFind, size_t stride=1)
 Tries to find a given number of ms2 spectra near the given spectrum index. More...
 
double precursor_upper_offset (const msdata::Precursor &p)
 
double precursor_lower_offset (const msdata::Precursor &p)
 
double precursor_target (const msdata::Precursor &p)
 
double precursor_mz_low (const msdata::Precursor &p)
 
double precursor_mz_high (const msdata::Precursor &p)
 
double precursor_iso_center (const msdata::Precursor &p)
 
double precursor_iso_width (const msdata::Precursor &p)
 
std::string prec_to_string (const msdata::Precursor &p)
 
bool stringToFloatCompare (std::string i, std::string j)
 
template<typename value_type >
bool parseRange (const std::string &desiredArg, const std::string &text, std::pair< value_type, value_type > &result, const std::string &callerName)
 
template<typename value_type >
bool parseValue (const std::string &desiredArg, const std::string &text, value_type &result, const std::string &callerName)
 
PWIZ_API_DECL std::ostream & operator<< (std::ostream &os, PepxmlRecordReader &prr)
 
PWIZ_API_DECL std::ostream & operator<< (std::ostream &os, const PeakelField &peakelField)
 
PWIZ_API_DECL std::ostream & operator<< (std::ostream &os, const SpectrumList_Filter::Predicate::FilterMode &mode)
 
PWIZ_API_DECL std::istream & operator>> (std::istream &is, SpectrumList_Filter::Predicate::FilterMode &mode)
 

Variables

static const char * defaultNeutralLossFormulae []
 

Typedef Documentation

◆ SpectrumDataFilterPtr

Definition at line 42 of file DataFilter.hpp.

◆ ChromatogramDataFilterPtr

Definition at line 52 of file DataFilter.hpp.

◆ PeakDetectorPtr

typedef boost::shared_ptr<PeakDetector> pwiz::analysis::PeakDetectorPtr

Definition at line 57 of file PeakDetector.hpp.

◆ SmootherPtr

typedef boost::shared_ptr<Smoother> pwiz::analysis::SmootherPtr

Definition at line 53 of file Smoother.hpp.

◆ ScanIdTokenizer

typedef boost::tokenizer<boost::char_separator<char> > pwiz::analysis::ScanIdTokenizer

Tool for pulling each scan id attribute and its value from a scan id.

Scan ids contain sets of attribute-value pairs. Each pair is separated from others by a space. Each attribute is separated from its value by an "=". E.g. "attribute1=value1 attribute2=value2 attribute3=value3"

Definition at line 69 of file DemuxHelpers.hpp.

◆ MZHash

typedef uint64_t pwiz::analysis::MZHash

Definition at line 90 of file IPrecursorMaskCodec.hpp.

◆ MSDataAnalyzerPtr

Definition at line 108 of file MSDataAnalyzer.hpp.

◆ PeakelField

Definition at line 111 of file MZRTField.hpp.

◆ FeatureField

Definition at line 112 of file MZRTField.hpp.

◆ Spectrum3D

typedef boost::container::flat_map<double, boost::container::flat_map<double, float> > pwiz::analysis::Spectrum3D

Definition at line 35 of file SpectrumList_3D.hpp.

◆ Spectrum3DPtr

typedef boost::shared_ptr<Spectrum3D> pwiz::analysis::Spectrum3DPtr

Definition at line 36 of file SpectrumList_3D.hpp.

◆ DemuxOptimization

Definition at line 118 of file SpectrumList_Demux.hpp.

Function Documentation

◆ enumToString()

template<typename T >
const std::string& pwiz::analysis::enumToString ( e,
std::map< T, std::string >  m 
)

Converts an enum to it's corresponding string in a prebuilt map.

Exception is thrown if map does not contain enum.

Parameters
[in]eThe enum
[out]mThe map pairing each enum to a string
Returns
Returns the string from the map

Definition at line 45 of file DemuxHelpers.hpp.

46  {
47  return m.at(e);
48  }

◆ stringToEnum()

template<typename T >
T pwiz::analysis::stringToEnum ( const std::string &  s,
std::map< T, std::string >  m 
)

Converts a string to it's corresponding enum in a prebuilt map.

Exception is thrown if map does not contain string.

Parameters
[in]sThe string
[out]mThe map pairing each enum to a string
Returns
Returns the enum from the map

Definition at line 57 of file DemuxHelpers.hpp.

58  {
59  for (auto it = m.begin(); it != m.end(); ++it) {
60  if (it->second.compare(s) == 0)
61  return it->first;
62  }
63  throw EnumConstantNotPresentException("Given string doesn't correspond to an enum");
64  }
An exception class inspired by Java&#39;s EnumConstantNotPresentException.

◆ TryGetScanIDToken()

bool pwiz::analysis::TryGetScanIDToken ( const msdata::SpectrumIdentity spectrumIdentity,
const std::string &  tokenName,
std::string &  value 
)

Tries to read the given token from a spectrum identity id.

The spectrum identity id is a set of pairs of attribute names (tokens) and their corresponding values.

Parameters
[in]spectrumIdentityThe SpectrumIdentity to search
[in]tokenNameattribute
[out]valuevalue
Returns
false if the given token does not exist in the SpectrumIdentity id

Referenced by DemuxHelpersTest::TryGetScanIDTokenTest().

◆ TryGetDemuxIndex()

bool pwiz::analysis::TryGetDemuxIndex ( const msdata::SpectrumIdentity spectrumIdentity,
size_t &  index 
)

Tries to read the index of the demultiplexed spectrum relative to the multiplexed spectrum it was derived from.

For example, if a multiplexed spectrum is split into 3 demultiplexed spectra, the resulting spectra will have indices 0, 1, and 2.

Parameters
[in]spectrumIdentityThe SpectrumIdentity to search
[out]indexThe demux index of the spectrum
Returns
false if the given SpectrumIdentity does not contain information about the scan index. E.g., if the given spectrum is not a demultiplexed spectrum.

Referenced by DemuxHelpersTest::TryGetDemuxIndexTest().

◆ TryGetOriginalIndex()

bool pwiz::analysis::TryGetOriginalIndex ( const msdata::SpectrumIdentity spectrumIdentity,
size_t &  index 
)

Tries to read the original index of the spectrum before demultiplexing using the SpectrumIdentity of a (demultiplexed) spectrum.

Demultiplexing effectively splits each spectrum into multiple demultiplexed spectra. This method allows for retrieval of the original spectrum before this split.

Parameters
[in]spectrumIdentityThe SpectrumIdentity to search
[out]indexThe original index of the spectrum
Returns
false if the given SpectrumIdentity does not contain information about the scan index

Referenced by testMSXOnly(), testOverlapOnly(), and DemuxHelpersTest::TryGetOriginalIndexTest().

◆ TryGetMSLevel()

bool pwiz::analysis::TryGetMSLevel ( const msdata::Spectrum spectrum,
int &  msLevel 
)

Tries to read MS level from spectrum.

Parameters
[in]spectrumThe mass spectrum to read
[out]msLevelThe number of sequential MS analyses (e.g. MS = 1, MS/MS = 2)
Returns
true if successful, false otherwise

Referenced by DemuxHelpersTest::TryGetMSLevelTest().

◆ TryGetNumPrecursors()

bool pwiz::analysis::TryGetNumPrecursors ( const msdata::Spectrum spectrum,
int &  numPrecursors 
)

Tries to get the number of precursors contributing to a multiplexed spectrum.

This is only well defined for spectra of MS2 or greater. (Note: only parsing of MS2 is implemented currently)

Parameters
[in]spectrumThe mass spectrum to read
[out]numPrecursorsThe number of precursor windows contributing to the given mass spectrum
Returns
true if successful, false otherwise

Referenced by DemuxHelpersTest::TryGetNumPrecursorsTest().

◆ TryGetStartTime()

bool pwiz::analysis::TryGetStartTime ( const msdata::Spectrum spectrum,
double &  startTime 
)

Tries to get the start time of the scan.

Parameters
[in]spectrumThe mass spectrum to read
[out]startTimeThe start time of the scan (may also be interpreted as retention time)
Returns
true if successful, false otherwise

Referenced by DemuxHelpersTest::TryGetStartTimeTest().

◆ FindNearbySpectra()

bool pwiz::analysis::FindNearbySpectra ( std::vector< size_t > &  spectraIndices,
pwiz::msdata::SpectrumList_const_ptr  slPtr,
size_t  centerIndex,
size_t  numSpectraToFind,
size_t  stride = 1 
)

Tries to find a given number of ms2 spectra near the given spectrum index.

This handles edge cases near the beginning and end of the SpectrumList and tries to distribute the spectra surrounding the centerIndex as evenly as possible. Throws std::out_of_range exception if center index is not in range of SpectrumList.

Parameters
[out]spectraIndicesThe indices to the nearby spectra.
[in]slPtrThe spectrum list to search
[in]centerIndexIndex of spectrum in the given SpectrumList around which to search
[in]numSpectraToFindNumber of spectra to find
[in]strideNumber of ms2 spectra to step through to find a nearby spectrum. E.g. a stride of 2 would skip every other ms2 spectrum. This will still return the chosen total number of spectra. This is useful when ms2 spectra are collected cyclically and only a single index within that cycle is desired.
Returns
false if not enough spectra can be found

Referenced by DemuxHelpersTest::FindNearbySpectraTest().

◆ precursor_upper_offset()

double pwiz::analysis::precursor_upper_offset ( const msdata::Precursor p)
inline

Definition at line 29 of file IPrecursorMaskCodec.hpp.

References pwiz::msdata::Precursor::isolationWindow, and MS_isolation_window_upper_offset.

Referenced by pwiz::analysis::DemuxWindow::DemuxWindow(), precursor_iso_center(), precursor_iso_width(), and precursor_mz_high().

30  {
31  auto upperOffsetParam = p.isolationWindow.cvParam(cv::MS_isolation_window_upper_offset);
32  if (upperOffsetParam.value.empty())
33  throw std::runtime_error("precursor_upper_offset() No isolation window upper offset m/z specified");
34  double upperOffset = upperOffsetParam.valueAs<double>();
35  if (upperOffset <= 0.0)
36  throw std::runtime_error("precursor_upper_offset() Positive values expected for isolation window m/z offsets");
37  return upperOffset;
38  }
MS_isolation_window_upper_offset
isolation window upper offset: The extent of the isolation window in m/z above the isolation window t...
Definition: cv.hpp:3034

◆ precursor_lower_offset()

double pwiz::analysis::precursor_lower_offset ( const msdata::Precursor p)
inline

Definition at line 40 of file IPrecursorMaskCodec.hpp.

References pwiz::msdata::Precursor::isolationWindow, and MS_isolation_window_lower_offset.

Referenced by pwiz::analysis::DemuxWindow::DemuxWindow(), precursor_iso_center(), precursor_iso_width(), and precursor_mz_low().

41  {
42  auto lowerOffsetParam = p.isolationWindow.cvParam(cv::MS_isolation_window_lower_offset);
43  if (lowerOffsetParam.value.empty())
44  throw std::runtime_error("precursor_lower_offset() No isolation window lower offset m/z specified");
45  double lowerOffset = lowerOffsetParam.valueAs<double>();
46  if (lowerOffset <= 0.0)
47  throw std::runtime_error("precursor_lower_offset() Positive values expected for isolation window m/z offsets");
48  return lowerOffset;
49  }
MS_isolation_window_lower_offset
isolation window lower offset: The extent of the isolation window in m/z below the isolation window t...
Definition: cv.hpp:3031

◆ precursor_target()

double pwiz::analysis::precursor_target ( const msdata::Precursor p)
inline

Definition at line 51 of file IPrecursorMaskCodec.hpp.

References pwiz::msdata::Precursor::isolationWindow, and MS_isolation_window_target_m_z.

Referenced by pwiz::analysis::DemuxWindow::DemuxWindow(), precursor_iso_center(), precursor_mz_high(), and precursor_mz_low().

52  {
53  auto targetParam = p.isolationWindow.cvParam(cv::MS_isolation_window_target_m_z);
54  if (targetParam.value.empty())
55  throw std::runtime_error("precursor_target() No isolation window target m/z specified");
56  return targetParam.valueAs<double>();
57  }
MS_isolation_window_target_m_z
isolation window target m/z: The primary or reference m/z about which the isolation window is defined...
Definition: cv.hpp:3028

◆ precursor_mz_low()

double pwiz::analysis::precursor_mz_low ( const msdata::Precursor p)
inline

Definition at line 59 of file IPrecursorMaskCodec.hpp.

References precursor_lower_offset(), and precursor_target().

60  {
62  }
double precursor_lower_offset(const msdata::Precursor &p)
double precursor_target(const msdata::Precursor &p)

◆ precursor_mz_high()

double pwiz::analysis::precursor_mz_high ( const msdata::Precursor p)
inline

Definition at line 64 of file IPrecursorMaskCodec.hpp.

References precursor_target(), and precursor_upper_offset().

65  {
67  }
double precursor_target(const msdata::Precursor &p)
double precursor_upper_offset(const msdata::Precursor &p)

◆ precursor_iso_center()

double pwiz::analysis::precursor_iso_center ( const msdata::Precursor p)
inline

Definition at line 69 of file IPrecursorMaskCodec.hpp.

References precursor_lower_offset(), precursor_target(), and precursor_upper_offset().

Referenced by prec_to_string().

70  {
71  double target = precursor_target(p);
72  double mzLow = target - precursor_lower_offset(p);
73  double mzHigh = target + precursor_upper_offset(p);
74  return (mzLow + mzHigh) / 2.0;
75  }
double precursor_lower_offset(const msdata::Precursor &p)
double precursor_target(const msdata::Precursor &p)
double precursor_upper_offset(const msdata::Precursor &p)

◆ precursor_iso_width()

double pwiz::analysis::precursor_iso_width ( const msdata::Precursor p)
inline

Definition at line 77 of file IPrecursorMaskCodec.hpp.

References precursor_lower_offset(), and precursor_upper_offset().

78  {
80  }
double precursor_lower_offset(const msdata::Precursor &p)
double precursor_upper_offset(const msdata::Precursor &p)

◆ prec_to_string()

std::string pwiz::analysis::prec_to_string ( const msdata::Precursor p)
inline

Definition at line 82 of file IPrecursorMaskCodec.hpp.

References pwiz::msdata::detail::Bruker::format(), and precursor_iso_center().

83  {
84  return str(boost::format("%.2f") % precursor_iso_center(p));
85  }
double precursor_iso_center(const msdata::Precursor &p)
PWIZ_API_DECL Reader_Bruker_Format format(const std::string &path)
returns Bruker format of &#39;path&#39; if it is a Bruker directory; otherwise returns empty string ...

◆ stringToFloatCompare()

bool pwiz::analysis::stringToFloatCompare ( std::string  i,
std::string  j 
)
inline

Definition at line 87 of file IPrecursorMaskCodec.hpp.

87 { return stof(i) < stof(j); }

◆ parseRange()

template<typename value_type >
bool pwiz::analysis::parseRange ( const std::string &  desiredArg,
const std::string &  text,
std::pair< value_type, value_type > &  result,
const std::string &  callerName 
)

Definition at line 193 of file MSDataAnalyzer.hpp.

References boost::lexical_cast().

194 {
195  if (!text.compare(0,desiredArg.size()+1,desiredArg+"="))
196  {
197  std::string val = text.substr(desiredArg.size()+1);
198  std::string::size_type indexPairSeperator = val.find(',');
199  if (std::string::npos == indexPairSeperator)
200  { // no comma, perhaps a dash instead?
201  indexPairSeperator = val.find('-');
202  if (0==indexPairSeperator) // assume that's just a negative value
203  {
204  indexPairSeperator = string::npos;
205  }
206  }
207  int bracket = (val[0] == '[')?1:0;
208  if (val.empty() ||
209  ((bracket!=0) && val[val.size()-1] != ']'))
210  {
211  std::cerr << "[" << callerName << "] Unable to parse range: " << text << endl;
212  return false;
213  }
214 
215  try
216  {
217  if (std::string::npos == indexPairSeperator)
218  { // form "<start>", read as "<start>-<start>"
219  std::string first = val.substr(bracket,val.size()-(2*bracket));
220  result.first = result.second = lexical_cast<value_type>(first);
221  }
222  else
223  { // form "<start>-<end>" or "<start>-"
224  std::string first = val.substr(bracket, indexPairSeperator-bracket);
225  std::string second = val.substr(indexPairSeperator+1, val.size()-indexPairSeperator-(1+bracket));
226  result.first = lexical_cast<value_type>(first);
227  if (second.size()) // form "<start>-<end>"
228  result.second = lexical_cast<value_type>(second);
229  else // form "<start>-", assume that's "<start>-maxval"
230  result.second = numeric_limits<value_type>::max();
231  }
232  return true;
233  }
234  catch (boost::bad_lexical_cast&)
235  {
236  std::cerr << "[" << callerName << "] Unable to parse range: " << text << endl;
237  }
238  }
239 
240  return false;
241 }
float lexical_cast(const std::string &str)

◆ parseValue()

template<typename value_type >
bool pwiz::analysis::parseValue ( const std::string &  desiredArg,
const std::string &  text,
value_type &  result,
const std::string &  callerName 
)

Definition at line 243 of file MSDataAnalyzer.hpp.

References boost::lexical_cast().

244 {
245  if (!text.compare(0,desiredArg.size()+1,desiredArg+"="))
246  {
247  std::string val = text.substr(desiredArg.size()+1);
248  if (val.empty())
249  {
250  std::cerr << "[" << callerName << "] Unable to parse value: " << text << endl;
251  return false;
252  }
253 
254  try
255  {
256  result = lexical_cast<value_type>(val);
257  return true;
258  }
259  catch (boost::bad_lexical_cast&)
260  {
261  std::cerr << "[" << callerName << "] Unable to parse value: " << text << endl;
262  }
263  }
264 
265  return false;
266 }
float lexical_cast(const std::string &str)

◆ operator<<() [1/3]

PWIZ_API_DECL std::ostream& pwiz::analysis::operator<< ( std::ostream &  os,
PepxmlRecordReader prr 
)

◆ operator<<() [2/3]

PWIZ_API_DECL std::ostream & pwiz::analysis::operator<< ( std::ostream &  os,
const PeakelField peakelField 
)

◆ operator<<() [3/3]

PWIZ_API_DECL std::ostream& pwiz::analysis::operator<< ( std::ostream &  os,
const SpectrumList_Filter::Predicate::FilterMode mode 
)

◆ operator>>()

PWIZ_API_DECL std::istream& pwiz::analysis::operator>> ( std::istream &  is,
SpectrumList_Filter::Predicate::FilterMode mode 
)

Variable Documentation

◆ defaultNeutralLossFormulae

const char* pwiz::analysis::defaultNeutralLossFormulae[]
static
Initial value:
= {
"H1",
"N1H2",
"N1H3",
"H2O1",
"C1O1",
"C1H4O1",
"N2H6",
"H5N1O1",
"H4O2",
"C1H3N2",
"C1H4N2",
"C1H3N1O1",
"C1H2O2",
"C2H6O1",
"C2H5N1O1",
"C1H5N3",
"C2H4O2",
"C4H11N1",
"C3H6S1",
"C4H6N2",
"C3H8N3",
"C4H9N3",
"C4H11N3",
"C7H8O1",
"C9H9N1"
}

Definition at line 73 of file PrecursorMassFilter.hpp.