OpenMS
SwathWindowLoader Class Reference

Class to read a file describing the Swath Windows. More...

#include <OpenMS/ANALYSIS/OPENSWATH/SwathWindowLoader.h>

Static Public Member Functions

static void annotateSwathMapsFromFile (const std::string &filename, std::vector< OpenSwath::SwathMap > &swath_maps, bool do_sort, bool force)
 Annotate a Swath map using a Swath window file specifying the individual windows. More...
 
static void readSwathWindows (const std::string &filename, std::vector< double > &swath_prec_lower, std::vector< double > &swath_prec_upper)
 Reading a tab delimited file specifying the SWATH windows. More...
 

Detailed Description

Class to read a file describing the Swath Windows.

The file must of be tab delimited and of the following format: window_lower window_upper 400 425 425 450 ...

Note that the first line is a header and will be skipped.

Member Function Documentation

◆ annotateSwathMapsFromFile()

static void annotateSwathMapsFromFile ( const std::string &  filename,
std::vector< OpenSwath::SwathMap > &  swath_maps,
bool  do_sort,
bool  force 
)
static

Annotate a Swath map using a Swath window file specifying the individual windows.

Note
It is assumed that the files in the swath_maps vector are in the same order as the windows in the provided file (usually from lowest to highest).
Parameters
filenameThe filename of the tab delimited file
swath_mapsThe list of SWATH maps (assumed to be in the same order as in the file)
do_sortSort the windows after reading in ascending order
forceForce overriding the window boundaries, even if the new boundaries are wider than the data boundaries
Exceptions
Exception::IllegalArgumentif the number of maps in the file and the provided input maps to not match, or if the new boundaries are outside of the data boundaries (unless force==true)

Referenced by TOPPOpenSwathBase::loadSwathFiles().

◆ readSwathWindows()

static void readSwathWindows ( const std::string &  filename,
std::vector< double > &  swath_prec_lower,
std::vector< double > &  swath_prec_upper 
)
static

Reading a tab delimited file specifying the SWATH windows.

The file must of be tab delimited and of the following format: window_lower window_upper 400 425 425 450 ...

Note that the first line is a header and will be skipped.

Parameters
filenameThe filename of the tab delimited file
swath_prec_lowerThe output vector for the window start
swath_prec_upperThe output vector for the window end
Exceptions
Exception::InvalidValueif window's start >= end