OpenMS
Loading...
Searching...
No Matches
TIC Class Reference

Total Ion Current (TIC) as a QC metric. More...

#include <OpenMS/QC/TIC.h>

Inheritance diagram for TIC:
[legend]
Collaboration diagram for TIC:
[legend]

Classes

struct  Result
 Computed Total Ion Current trace plus stability counters. More...
 

Public Member Functions

 TIC ()=default
 Default constructor.
 
virtual ~TIC ()=default
 Destructor.
 
Result compute (const MSExperiment &exp, float bin_size=0, UInt ms_level=1)
 Compute the Total Ion Current trace and stability metrics.
 
const std::string & getName () const override
 Name of this QC metric ("TIC").
 
const std::vector< MSChromatogram > & getResults () const
 
QCBase::Status requirements () const override
 Input-data requirements of compute (raw mzML data).
 
void addMetaDataMetricsToMzTab (MzTabMetaData &meta, const std::vector< Result > &tics)
 Append the TIC traces from tics to the MTD section of meta as custom parameters.
 
- Public Member Functions inherited from QCBase
bool isRunnable (const Status &s) const
 

Private Attributes

const std::string name_ = "TIC"
 

Additional Inherited Members

- Public Types inherited from QCBase
enum class  Requires : UInt64 {
  NOTHING , RAWMZML , POSTFDRFEAT , PREFDRFEAT ,
  CONTAMINANTS , TRAFOALIGN , ID , SIZE_OF_REQUIRES
}
 Enum to encode a file type as a bit. More...
 
enum class  ToleranceUnit { AUTO , PPM , DA , SIZE_OF_TOLERANCEUNIT }
 
using Status = FlagSet< Requires >
 
- Static Public Member Functions inherited from QCBase
static bool isLabeledExperiment (const ConsensusMap &cm)
 check if the IsobaricAnalyzer TOPP tool was used to create this ConsensusMap
 
template<typename MAP >
static bool hasPepID (const MAP &fmap)
 does the container have a PeptideIdentification in its members or as unassignedPepID ?
 
- Static Public Attributes inherited from QCBase
static const std::string names_of_requires []
 strings corresponding to enum Requires
 
static const std::string names_of_toleranceUnit []
 strings corresponding to enum ToleranceUnit
 

Detailed Description

Total Ion Current (TIC) as a QC metric.

Builds a Total Ion Current trace at a chosen MS level from an MSExperiment and returns a Result that bundles the per-bin intensities, the relative intensities (0 – 100), the retention times, the area under the TIC and two stability counters that flag abrupt 10-fold intensity changes between consecutive bins. Each call to compute is independent; results are returned to the caller and not retained by the instance.

Constructor & Destructor Documentation

◆ TIC()

TIC ( )
default

Default constructor.

◆ ~TIC()

virtual ~TIC ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addMetaDataMetricsToMzTab()

void addMetaDataMetricsToMzTab ( MzTabMetaData meta,
const std::vector< Result > &  tics 
)

Append the TIC traces from tics to the MTD section of meta as custom parameters.

For every non-empty entry in tics one custom parameter is added to meta, named TIC_1, TIC_2, ... (1-based index into tics), with the controlled-vocabulary label "total ion current" (MS:1000285). The value is a flat list of [rt0,int0,rt1,int1,...] pairs taken from Result::retention_times and Result::intensities.

Parameters
[in,out]metamzTab metadata section to extend.
[in]ticsTIC results to serialise; empty entries are skipped.

◆ compute()

Result compute ( const MSExperiment exp,
float  bin_size = 0,
UInt  ms_level = 1 
)

Compute the Total Ion Current trace and stability metrics.

Builds the TIC at the requested MS level. When bin_size is positive, intensities are summed within bin_size second retention-time bins; when bin_size is 0, no resampling is applied and the trace contains one entry per source spectrum.

The returned Result is empty when exp has no spectra of MS level ms_level.

Parameters
[in]expSource experiment.
[in]bin_sizeRT bin size in seconds; 0 disables binning.
[in]ms_levelMS level whose spectra are aggregated.
Returns
Computed metrics. The Result::intensities and Result::retention_times are empty when no spectra of ms_level are present.

◆ getName()

const std::string & getName ( ) const
overridevirtual

Name of this QC metric ("TIC").

Implements QCBase.

◆ getResults()

const std::vector< MSChromatogram > & getResults ( ) const

◆ requirements()

QCBase::Status requirements ( ) const
overridevirtual

Input-data requirements of compute (raw mzML data).

Implements QCBase.

Member Data Documentation

◆ name_

const std::string name_ = "TIC"
private