 |
OpenMS
2.4.0
|
Go to the documentation of this file.
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
47 #include <QtGui/QColor>
74 static MultiGradient getDefaultGradientLogarithmicIntensityMode();
96 void insert(
double position, QColor color);
112 QColor color(
UInt index);
121 QColor interpolatedColorAt(
double position)
const;
128 QColor interpolatedColorAt(
double position,
double min,
double max)
const;
131 void activatePrecalculationMode(
double min,
double max,
UInt steps);
133 void deactivatePrecalculationMode();
138 OPENMS_PRECONDITION(pre_.size() != 0,
"MultiGradient::precalculatedColorIndex(double): Precalculation mode not activated!");
139 OPENMS_PRECONDITION(
position >= pre_min_, (
String(
"MultiGradient::precalculatedColorIndex(double): position ") +
position +
" out of specified range (" + pre_min_ +
"-" + (pre_min_ + pre_size_) +
")!").c_str());
141 Int index = (
Int)((
position - pre_min_) / pre_size_ * pre_steps_);
143 return qBound( 0, index, (
Int)pre_.size() - 1 );
149 OPENMS_PRECONDITION(pre_.size() != 0,
"MultiGradient::precalculatedColorByIndex(Int): Precalculation mode not activated!");
150 OPENMS_PRECONDITION( index >= 0,
"MultiGradient::precalculatedColorByIndex(Int): negative indexes not allowed");
151 OPENMS_PRECONDITION( index < (
Int)pre_.size(), (
String(
"MultiGradient::indexedColor(Int): index ") + index +
" out of specified range (0-" + pre_.size() +
")!").c_str());
165 return precalculatedColorByIndex( precalculatedColorIndex(
position ) );
178 void setInterpolationMode(InterpolationMode mode);
180 InterpolationMode getInterpolationMode()
const;
199 void fromString(
const std::string & gradient);
A gradient of multiple colors and arbitrary distances between colors.
Definition: MultiGradient.h:67
Base class for TOPP applications.
Definition: TOPPBase.h:150
Representation of the Experimental Design in OpenMS. Instances can be loaded via the ExperimentalDesi...
Definition: ExperimentalDesign.h:85
static ExperimentalDesign load(const String &tsv_file, bool require_spectra_files)
Loads an experimental design from a tabular separated file.
void addLine(const StringType &line)
Definition: TextFile.h:112
static String basename(const String &file)
Returns the basename of the file (without the path).
double pre_size_
Width of the precalculated color range.
Definition: MultiGradient.h:211
A more convenient string class.
Definition: String.h:57
A basic LC-MS feature.
Definition: BaseFeature.h:55
void setProteinAccession(const String &s)
set the protein accession the peptide matches to. If not available set to empty string.
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:67
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
void getPrimaryMSRunPath(StringList &toFill) const
returns the MS run path (stored in ColumnHeaders)
std::set< FeatureHandle, FeatureHandle::IndexLess > HandleSetType
Type definitions.
Definition: ConsensusFeature.h:75
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
#define OPENMS_PRECONDITION(condition, message)
Precondition macro.
Definition: openms/include/OpenMS/CONCEPT/Macros.h:106
double pre_min_
Minimum of the precalculated color range.
Definition: MultiGradient.h:209
const std::vector< PeptideIdentification > & getPeptideIdentifications() const
returns a const reference to the PeptideIdentification vector
InterpolationMode
Interpolation mode.
Definition: MultiGradient.h:77
InterpolationMode interpolation_mode_
Current interpolation mode.
Definition: MultiGradient.h:205
std::map< std::pair< String, unsigned >, unsigned > getPathLabelToFractionMapping(bool) const
return <file_path, label> to fraction mapping
Int precalculatedColorIndex(double position) const
index of color in precalculated table by position in gradient
Definition: MultiGradient.h:136
int Int
Signed integer type.
Definition: Types.h:102
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
int charge
Definition: PeptideHit.h:85
#define LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:450
String annotation
Definition: PeptideHit.h:84
std::vector< QColor > pre_
Precalculated colors.
Definition: MultiGradient.h:207
QColor precalculatedColorByIndex(Int index) const
precalculated color by its index in the table
Definition: MultiGradient.h:147
Definition: ExperimentalDesign.h:105
unsigned getNumberOfLabels() const
UInt pre_steps_
Steps of the precalculated color range.
Definition: MultiGradient.h:213
Type
Actual file types enum.
Definition: FileTypes.h:58
Representation of a peptide evidence.
Definition: PeptideEvidence.h:50
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
Size precalculatedSize() const
size of precalculated colors table
Definition: MultiGradient.h:172
#define LOG_FATAL_ERROR
Macro to be used if fatal error are reported (processing stops)
Definition: LogStream.h:442
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
IM_LINEAR returns the linear interpolation (default).
Definition: MultiGradient.h:79
std::map< double, QColor > pos_col_
Map of index and color.
Definition: MultiGradient.h:203
Definition: ExperimentalDesign.h:94
A container for consensus elements.
Definition: ConsensusMap.h:75
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:73
String getFactorValue(unsigned sample, const String &factor)
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
bool hasFactor(const String &factor) const
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
std::vector< MSFileSectionEntry > MSFileSection
Definition: ExperimentalDesign.h:147
bool isFractionated() const
const ExperimentalDesign::SampleSection & getSampleSection() const
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
std::map< std::pair< String, unsigned >, unsigned > getPathLabelToSampleMapping(bool) const
return <file_path, label> to sample mapping
void store(const String &filename)
Writes the data to a file.
const MSFileSection & getMSFileSection() const
std::map< std::pair< String, unsigned >, unsigned > getPathLabelToFractionGroupMapping(bool) const
return <file_path, label> to fraction_group mapping
Size< TNeedle >::Type position(const PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:561
Contains annotations of a peak.
Definition: PeptideHit.h:82
String toString(T i)
toString functions (single argument)
Definition: StringUtils.h:68
QColor precalculatedColorAt(double position) const
Returns a precalculated color.
Definition: MultiGradient.h:163
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61
std::map< UInt64, ColumnHeader > ColumnHeaders
Definition: ConsensusMap.h:136
Representation of a peptide hit.
Definition: PeptideHit.h:54