OpenMS
FLASHDeconvSpectrumFile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Kyowon Jeong $
6 // $Authors: Kyowon Jeong $
7 // --------------------------------------------------------------------------
8 #pragma once
9 
10 #include <OpenMS/config.h>
13 
14 #include <iomanip>
15 
16 namespace OpenMS
17 {
23  class OPENMS_DLLAPI FLASHDeconvSpectrumFile
24  {
25  public:
33  static void writeDeconvolvedMassesHeader(std::fstream& fs,
34  uint ms_level,
35  bool detail,
36  bool report_decoy);
37 
60  std::fstream& fs,
61  const String& file_name,
63  double tol,
64  bool write_detail,
65  bool record_decoy);
66 
76  static void writeMzML(const MSExperiment& map, std::vector<DeconvolvedSpectrum>& deconvolved_spectra, const String& deconvolved_mzML_file, const String& annotated_mzML_file, int mzml_charge, DoubleList tols);
77 
83  static void writeIsobaricQuantification(std::fstream& fs, std::vector<DeconvolvedSpectrum>& deconvolved_spectra);
84 
85  static void writeDLMatrixHeader(std::fstream& fs);
86 
87  static void writeDLMatrix(std::vector<DeconvolvedSpectrum>& dspecs, double tol, std::fstream& fs, const FLASHDeconvHelperStructs::PrecalculatedAveragine& avg);
88 
89  static void writeTopFDHeader(std::fstream& fs, const Param& param);
90 
102  // @param avg averagine information to calculate monoisotopic and average mass difference
103  static void writeTopFD(DeconvolvedSpectrum& dspec, std::fstream& fs, const String& filename,
104  const double snr_threshold = 1.0,
105  const double qval_threshold = 1.0,
106  const uint min_ms_level = 1,
107  bool randomize_precursor_mass = false,
108  bool randomize_fragment_mass = false);
109 
110  private:
111 
113  static const int topFD_min_peak_count_ = 3;
115  static const int topFD_max_peak_count_ = 500;
116 
117  };
118 }// namespace OpenMS
A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroups representing ...
Definition: DeconvolvedSpectrum.h:30
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition: FLASHDeconvHelperStructs.h:33
FLASHDeconv Spectrum level output *.tsv, *.msalign (for TopPIC) file formats.
Definition: FLASHDeconvSpectrumFile.h:24
static void writeDLMatrix(std::vector< DeconvolvedSpectrum > &dspecs, double tol, std::fstream &fs, const FLASHDeconvHelperStructs::PrecalculatedAveragine &avg)
static void writeIsobaricQuantification(std::fstream &fs, std::vector< DeconvolvedSpectrum > &deconvolved_spectra)
static void writeMzML(const MSExperiment &map, std::vector< DeconvolvedSpectrum > &deconvolved_spectra, const String &deconvolved_mzML_file, const String &annotated_mzML_file, int mzml_charge, DoubleList tols)
static void writeDLMatrixHeader(std::fstream &fs)
static void writeTopFD(DeconvolvedSpectrum &dspec, std::fstream &fs, const String &filename, const double snr_threshold=1.0, const double qval_threshold=1.0, const uint min_ms_level=1, bool randomize_precursor_mass=false, bool randomize_fragment_mass=false)
write the deconvolved masses TopFD output (*.msalign)
static void writeDeconvolvedMasses(DeconvolvedSpectrum &dspec, std::fstream &fs, const String &file_name, const FLASHDeconvHelperStructs::PrecalculatedAveragine &avg, double tol, bool write_detail, bool record_decoy)
write the deconvolved masses in the output file (spectrum level)
static void writeDeconvolvedMassesHeader(std::fstream &fs, uint ms_level, bool detail, bool report_decoy)
write the header in the tsv output file (spectrum level)
static void writeTopFDHeader(std::fstream &fs, const Param &param)
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
Management and storage of parameters / INI files.
Definition: Param.h:44
A more convenient string class.
Definition: String.h:34
std::vector< double > DoubleList
Vector of double precision real types.
Definition: ListUtils.h:36
FLASHIda C++ to C# (or vice versa) bridge functions The functions here are called in C# to invoke fun...
Definition: FeatureDeconvolution.h:22
static FLASHDeconvHelperStructs::PrecalculatedAveragine avg
keeps the precalculated averagine to calculate average masses from monoisotopic masses
Definition: FLASHIdaBridgeFunctions.h:85