Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Attributes | List of all members
TransitionTSVReader Class Reference

This class can convert TraML and TSV files into each other. More...

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

Inheritance diagram for TransitionTSVReader:
ProgressLogger

Classes

struct  TSVTransition
 

Public Member Functions

void convertTargetedExperimentToTSV (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
 Write out a targeted experiment (TraML structure) into a tsv file. More...
 
void convertTSVToTargetedExperiment (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
 Read in a tsv file and construct a targeted experiment (TraML structure) More...
 
void validateTargetedExperiment (OpenMS::TargetedExperiment &targeted_exp)
 Validate a TargetedExperiment (check that all ids are unique) More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

Private Types

typedef std::vector
< OpenMS::TargetedExperiment::Protein
ProteinVectorType
 
typedef std::vector
< OpenMS::TargetedExperiment::Peptide
PeptideVectorType
 
typedef std::vector
< OpenMS::ReactionMonitoringTransition
TransitionVectorType
 

Private Member Functions

void readTSVInput_ (const char *filename, std::vector< TSVTransition > &transition_list)
 read TSV input with columns in defined order More...
 
void getTSVHeader (std::string &line, char &delimiter, std::vector< std::string > header, std::map< std::string, int > &header_dict)
 determine separater in a CSV file and check for correct headers More...
 
void readUnstructuredTSVInput_ (const char *filename, std::vector< TSVTransition > &transition_list)
 read tab or comma separated input with columns defined by their column headers only More...
 
void cleanUpTransition (TSVTransition &mytransition)
 do post-processing on read input data (removing quotes etc) More...
 
void TSVToTargetedExperiment_ (std::vector< TSVTransition > &transition_list, OpenMS::TargetedExperiment &exp)
 store a list of TSVTransition objects properly in a TargetedExperiment More...
 
void createTransition_ (std::vector< TSVTransition >::iterator &tr_it, OpenMS::ReactionMonitoringTransition &rm_trans)
 
void createProtein_ (std::vector< TSVTransition >::iterator &tr_it, OpenMS::TargetedExperiment::Protein &protein)
 
void createPeptide_ (std::vector< TSVTransition >::iterator &tr_it, OpenMS::TargetedExperiment::Peptide &peptide)
 
void add_modification_ (std::vector< TargetedExperiment::Peptide::Modification > &mods, int location, ResidueModification &rmod, const String &name)
 
void writeTSVOutput_ (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
 write a TargetedExperiment to a file More...
 

Static Private Attributes

static const char * strarray []
 
static const std::vector
< std::string > 
header_names
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
SignedSize begin_
 
SignedSize end_
 
SignedSize value_
 
QProgressDialog * dlg_
 
StopWatch stop_watch_
 
time_t last_invoke_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

This class can convert TraML and TSV files into each other.

The TSV are tab-separated and need to have the following columns:

PrecursorMz (float) ProductMz (float) Tr_calibrated (float) transition_name (free text, needs to be unique for each transition [in this file]) CE (float) LibraryIntensity (float) transition_group_id (free text, designates the transition group [e.g. peptide] to which this transition belongs) decoy (1==decoy, 0== no decoy; determines whether the transition is a decoy transition or not) PeptideSequence (free text, sequence only (no modifications) ) ProteinName (free text) Annotation (free text, e.g. y7) FullUniModPeptideName (free text, should contain modifications*) MissedCleavages Replicates NrModifications PrecursorCharge (integer) Labelgroup (free text, e.g. heavy or light)

Member Typedef Documentation

Member Function Documentation

void add_modification_ ( std::vector< TargetedExperiment::Peptide::Modification > &  mods,
int  location,
ResidueModification rmod,
const String name 
)
private
void cleanUpTransition ( TSVTransition mytransition)
private

do post-processing on read input data (removing quotes etc)

void convertTargetedExperimentToTSV ( const char *  filename,
OpenMS::TargetedExperiment targeted_exp 
)

Write out a targeted experiment (TraML structure) into a tsv file.

void convertTSVToTargetedExperiment ( const char *  filename,
OpenMS::TargetedExperiment targeted_exp 
)

Read in a tsv file and construct a targeted experiment (TraML structure)

void createPeptide_ ( std::vector< TSVTransition >::iterator &  tr_it,
OpenMS::TargetedExperiment::Peptide peptide 
)
private
void createProtein_ ( std::vector< TSVTransition >::iterator &  tr_it,
OpenMS::TargetedExperiment::Protein protein 
)
private
void createTransition_ ( std::vector< TSVTransition >::iterator &  tr_it,
OpenMS::ReactionMonitoringTransition rm_trans 
)
private
void getTSVHeader ( std::string &  line,
char &  delimiter,
std::vector< std::string >  header,
std::map< std::string, int > &  header_dict 
)
private

determine separater in a CSV file and check for correct headers

void readTSVInput_ ( const char *  filename,
std::vector< TSVTransition > &  transition_list 
)
private

read TSV input with columns in defined order

void readUnstructuredTSVInput_ ( const char *  filename,
std::vector< TSVTransition > &  transition_list 
)
private

read tab or comma separated input with columns defined by their column headers only

void TSVToTargetedExperiment_ ( std::vector< TSVTransition > &  transition_list,
OpenMS::TargetedExperiment exp 
)
private

store a list of TSVTransition objects properly in a TargetedExperiment

void validateTargetedExperiment ( OpenMS::TargetedExperiment targeted_exp)

Validate a TargetedExperiment (check that all ids are unique)

void writeTSVOutput_ ( const char *  filename,
OpenMS::TargetedExperiment targeted_exp 
)
private

write a TargetedExperiment to a file

Member Data Documentation

const std::vector<std::string> header_names
staticprivate
const char* strarray[]
staticprivate

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:27 using doxygen 1.8.5