Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Attributes

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

List of all members.

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.
void convertTSVToTargetedExperiment (const char *filename, OpenMS::TargetedExperiment &targeted_exp)
 Read in a tsv file and construct a targeted experiment (TraML structure).
void validateTargetedExperiment (OpenMS::TargetedExperiment &targeted_exp)
 Validate a TargetedExperiment (check that all ids are unique).

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
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
void readUnstructuredTSVInput_ (const char *filename, std::vector< TSVTransition > &transition_list)
 read tab or comma separated input with columns defined by their column headers only
void cleanUpTransition (TSVTransition &mytransition)
 do post-processing on read input data (removing quotes etc)
void TSVToTargetedExperiment_ (std::vector< TSVTransition > &transition_list, OpenMS::TargetedExperiment &exp)
 store a list of TSVTransition objects properly in a TargetedExperiment
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

Static Private Attributes

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

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 [static, private]
const char* strarray[] [static, private]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1