OpenMS
|
Ripping protein/peptide identification according their file origin. More...
#include <OpenMS/ANALYSIS/ID/IDRipper.h>
Classes | |
struct | IdentificationRuns |
Represents a set of IdentificationRuns. More... | |
struct | RipFileContent |
Represents the content of an IDRipper output file. More... | |
struct | RipFileIdentifier |
Identifies an IDRipper output file. More... | |
struct | RipFileIdentifierIdxComparator |
Provides a 'less' operation for RipFileIdentifiers that ignores the out_basename and origin_fullname members. More... | |
Public Types | |
enum | OriginAnnotationFormat { FILE_ORIGIN = 0 , MAP_INDEX = 1 , ID_MERGE_INDEX = 2 , UNKNOWN_OAF = 3 , SIZE_OF_ORIGIN_ANNOTATION_FORMAT = 4 } |
Possible input file encodings for the origin as used by different versions of IDMerger. More... | |
typedef std::map< RipFileIdentifier, RipFileContent, RipFileIdentifierIdxComparator > | RipFileMap |
Represents the result of an IDRipper process, a map assigning file content to output file identifiers. More... | |
Public Member Functions | |
IDRipper () | |
Default constructor. More... | |
~IDRipper () override | |
Destructor. More... | |
void | rip (RipFileMap &ripped, std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, bool numeric_filenames, bool split_ident_runs) |
Ripping protein/peptide identification according their file origin. More... | |
void | rip (std::vector< RipFileIdentifier > &rfis, std::vector< RipFileContent > &rfcs, std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, bool numeric_filenames, bool split_ident_runs) |
Ripping protein/peptide identification according their file origin. More... | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Static Public Attributes | |
static const std::array< std::string, SIZE_OF_ORIGIN_ANNOTATION_FORMAT > | names_of_OriginAnnotationFormat |
String representations for the OriginAnnotationFormat enum. More... | |
Private Member Functions | |
IDRipper (const IDRipper &rhs) | |
Copy constructor. More... | |
IDRipper & | operator= (const IDRipper &rhs) |
Assignment. More... | |
OriginAnnotationFormat | detectOriginAnnotationFormat_ (std::map< String, UInt > &file_origin_map, const std::vector< PeptideIdentification > &peptide_idents) |
helper function, detects file origin annotation standard from collections of protein and peptide hits More... | |
void | getProteinHits_ (std::vector< ProteinHit > &result, const std::unordered_map< String, const ProteinHit * > &acc2protein_hits, const std::set< String > &protein_accessions) |
helper function, extracts all protein hits that match the protein accession More... | |
std::set< String > | getProteinAccessions_ (const std::vector< PeptideHit > &peptide_hits) |
helper function, returns the string representation of the peptide hit accession More... | |
int | getProteinIdentification_ (const PeptideIdentification &pep_ident, const IdentificationRuns &id_runs) |
helper function, returns the index of the protein identification for the given peptide identification based on the same identifier using id_runs as lookup More... | |
bool | registerBasename_ (std::map< String, std::pair< UInt, UInt > > &basename_to_numeric, const IDRipper::RipFileIdentifier &rfi) |
helper function, register a potential output file basename to detect duplicate output basenames More... | |
bool | setOriginAnnotationMode_ (short &mode, short const new_value) |
helper function, sets the value of mode to new_value and returns true if the old value was identical or unset (-1) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Ripping protein/peptide identification according their file origin.
Helper class, which is used by ProteinQuantifier. See there for further documentation.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|
typedef std::map<RipFileIdentifier, RipFileContent, RipFileIdentifierIdxComparator> RipFileMap |
Represents the result of an IDRipper process, a map assigning file content to output file identifiers.
IDRipper | ( | ) |
Default constructor.
|
override |
Destructor.
|
private |
helper function, detects file origin annotation standard from collections of protein and peptide hits
|
private |
helper function, returns the string representation of the peptide hit accession
|
private |
helper function, extracts all protein hits that match the protein accession
|
private |
helper function, returns the index of the protein identification for the given peptide identification based on the same identifier using id_runs as lookup
|
private |
helper function, register a potential output file basename to detect duplicate output basenames
void rip | ( | RipFileMap & | ripped, |
std::vector< ProteinIdentification > & | proteins, | ||
std::vector< PeptideIdentification > & | peptides, | ||
bool | numeric_filenames, | ||
bool | split_ident_runs | ||
) |
Ripping protein/peptide identification according their file origin.
Iteration over all peptides
. For each annotated file origin create a map entry and store the respective peptides
and proteins
.
ripped | Contains the protein identification and peptide identification for each file origin annotated in proteins and peptides |
proteins | Protein identification |
peptides | Peptide identification annotated with file origin |
numeric_filenames | If false, deduce output files using basenames of origin annotations. Throws an exception if they are not unique. If true, assemble output files based on numerical IDs only. |
split_ident_runs | Split identification runs into different files. |
void rip | ( | std::vector< RipFileIdentifier > & | rfis, |
std::vector< RipFileContent > & | rfcs, | ||
std::vector< ProteinIdentification > & | proteins, | ||
std::vector< PeptideIdentification > & | peptides, | ||
bool | numeric_filenames, | ||
bool | split_ident_runs | ||
) |
Ripping protein/peptide identification according their file origin.
Iteration over all peptides
. For each annotated file origin create a map entry and store the respective peptides
and proteins
.
[out] | rfis | File info relating to rfcs |
[out] | rfcs | Contains the protein identification and peptide identification for each file origin annotated in proteins and peptides |
proteins | Protein identification | |
peptides | Peptide identification annotated with file origin | |
numeric_filenames | If false, deduce output files using basenames of origin annotations. Throws an exception if they are not unique. If true, assemble output files based on numerical IDs only. | |
split_ident_runs | Split identification runs into different files. |
|
private |
helper function, sets the value of mode to new_value and returns true if the old value was identical or unset (-1)
|
static |
String representations for the OriginAnnotationFormat enum.