|
OpenMS
2.6.0
|
Go to the documentation of this file.
53 typedef std::vector<String>::iterator
Iterator;
80 TextFile(
const String& filename,
bool trim_lines =
false,
Int first_n = -1,
bool skip_empty_lines =
false);
92 void load(
const String& filename,
bool trim_lines =
false,
Int first_n = -1,
bool skip_empty_lines =
false);
101 void store(
const String& filename);
104 template <
typename StringType>
107 buffer_.push_back(static_cast<String>(
string));
111 template <
typename StringType>
114 buffer_.push_back(static_cast<String>(line));
123 static std::istream& getLine(std::istream& is, std::string& t);
128 ConstIterator begin()
const;
134 ConstIterator end()
const;
void sortByQuality(bool reverse=false)
Sorts the peaks according to ascending quality.
Protease digestion_enzyme
The cleavage site information in details (from ProteaseDB)
Definition: ProteinIdentification.h:273
OpenMS identification format (.idXML)
Definition: FileTypes.h:66
Int getCharge() const
returns the charge of the peptide
Base class for TOPP applications.
Definition: TOPPBase.h:144
void addLine(const StringType &line)
Definition: TextFile.h:112
QuotingMethod
How to handle embedded quotes when quoting strings.
Definition: String.h:82
bool hasRT() const
shortcut for isnan(getRT())
void sortBySize()
Sorts with respect to the size (number of elements)
WidthType getWidth() const
Non-mutable access to the features width (full width at half max, FWHM)
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
bool modifyStrings(bool modify)
Switch modification of strings (quoting/replacing of separators) on/off.
void sortByPosition()
Lexicographically sorts the peaks by their position (First RT then m/z).
std::vector< String >::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: TextFile.h:60
MzML file (.mzML)
Definition: FileTypes.h:72
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:268
WidthType getWidth() const
Returns the width (FWHM)
A more convenient string class.
Definition: String.h:59
std::vector< String > accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition: ProteinIdentification.h:134
A basic LC-MS feature.
Definition: BaseFeature.h:56
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
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
Representation of a protein hit.
Definition: ProteinHit.h:58
double getCoverage() const
returns the coverage (in percent) of the protein hit based upon matched peptides
Definition: ProteinIdentification.h:249
IntensityType getIntensity() const
Definition: Peak2D.h:166
void sortByMaps()
Sorts with respect to the sets of maps covered by the consensus features (lexicographically).
Base::const_iterator const_iterator
Definition: MSExperiment.h:125
Unknown file extension.
Definition: FileTypes.h:60
TextFile & operator<<(const StringType &string)
Operator for appending entries with less code.
Definition: TextFile.h:105
Representation of a protein identification run.
Definition: ProteinIdentification.h:70
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:172
double CoordinateType
Coordinate type (of the position)
Definition: Peak2D.h:64
void sortByIntensity(bool reverse=false)
Sorts the peaks according to ascending intensity.
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
static DateTime now()
Returns the current date and time.
void setCharge(ChargeType charge)
Sets the charge.
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
Exception indicating that an invalid parameter was handed over to an algorithm.
Definition: Exception.h:347
static String concatenate(const std::vector< T > &container, const String &glue="")
Concatenates all elements of the container and puts the glue string between elements.
Definition: ListUtils.h:193
const String & getIdentifier() const
Returns the identifier.
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:264
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:214
const String & getAccession() const
returns the accession of the protein
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
void get(UInt &month, UInt &day, UInt &year, UInt &hour, UInt &minute, UInt &second) const
Fills the arguments with the date and the time.
SVOutStream & write(const String &str)
Unformatted output (no quoting: useful for comments, but use only on a line of its own!...
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:267
OpenMS feature file (.featureXML)
Definition: FileTypes.h:65
PeakMassType mass_type
Mass type of the peaks.
Definition: ProteinIdentification.h:265
const std::vector< MSChromatogram > & getChromatograms() const
returns the chromatogram list
Stream class for writing to comma/tab/...-separated values files.
Definition: SVOutStream.h:54
const String & getSearchEngineVersion() const
Returns the search engine version.
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
String db
The used database.
Definition: ProteinIdentification.h:261
const std::vector< ProteinHit > & getHits() const
Returns the protein hits.
Facilitates file handling by file type recognition.
Definition: FileHandler.h:62
static const char UNKNOWN_AA
Definition: PeptideEvidence.h:57
UInt getRank() const
returns the PSM rank
bool loadExperiment(const String &filename, MSExperiment &exp, FileTypes::Type force_type=FileTypes::UNKNOWN, ProgressLogger::LogType log=ProgressLogger::NONE, const bool rewrite_source_file=true, const bool compute_hash=true)
Loads a file into an MSExperiment.
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
Type
Actual file types enum.
Definition: FileTypes.h:58
Unable to create file exception.
Definition: Exception.h:636
const ChargeType & getCharge() const
Non-mutable access to charge state.
const String & getSequence() const
returns the protein sequence
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
bool hasMZ() const
shortcut for isnan(getRT())
void setWidth(WidthType width)
Sets the width (FWHM)
String db_version
The database version.
Definition: ProteinIdentification.h:262
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:202
HandleSetType::const_iterator const_iterator
Definition: ConsensusFeature.h:76
Definition: SVOutStream.h:45
std::vector< String >::iterator Iterator
Mutable iterator.
Definition: TextFile.h:54
Definition: ChromatogramSettings.h:74
std::vector< String >::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: TextFile.h:58
const String & getScoreType() const
returns the peptide score type
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition: ProteinIdentification.h:269
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
A container for consensus elements.
Definition: ConsensusMap.h:80
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
CoordinateType getRT() const
Returns the RT coordinate (index 0)
Definition: Peak2D.h:208
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
const SearchParameters & getSearchParameters() const
Returns the search parameters.
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:266
void sortByRT()
Sorts the peaks to RT position.
SVOutStream & writeValueOrNan(NumericT thing)
Write a numeric value or "nan"/"inf"/"-inf", if applicable (would not be needed for Linux)
Definition: SVOutStream.h:171
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition: ProteinIdentification.h:271
const ColumnHeaders & getColumnHeaders() const
Non-mutable access to the file descriptions.
const std::vector< PeptideEvidence > & getPeptideEvidences() const
returns information on peptides (potentially) identified by this PSM
A container for features.
Definition: FeatureMap.h:97
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
double getMZ() const
returns the MZ of the MS2 spectrum
An LC-MS feature.
Definition: Feature.h:70
Representation of a Peak2D, RichPeak2D or Feature .
Definition: FeatureHandle.h:57
const std::vector< MSSpectrum > & getSpectra() const
returns the spectrum list
double getScore() const
returns the PSM score
String getDescription() const
returns the description of the protein
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
void sortByMZ()
Sorts the peaks to m/z position.
const String & getScoreType() const
Returns the protein score type.
No progress logging.
Definition: ProgressLogger.h:74
const String & getIdentifier() const
returns the identifier
CoordinateType getMZ() const
Returns the m/z coordinate (index 1)
Definition: Peak2D.h:196
bool isHigherScoreBetter() const
Returns true if a higher score represents a better score.
String getName() const
returns the name of the enzyme
double getScore() const
returns the score of the protein hit
double probability
Probability of this group.
Definition: ProteinIdentification.h:131
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSChromatogram.h:93
std::vector< String > buffer_
Internal buffer storing the lines before writing them to the file.
Definition: TextFile.h:140
Search parameters of the DB search.
Definition: ProteinIdentification.h:258
std::vector< String >::const_iterator ConstIterator
Non-mutable iterator.
Definition: TextFile.h:56
String taxonomy
The taxonomy restriction.
Definition: ProteinIdentification.h:263
ChargeType getCharge() const
Returns the charge.
UInt getRank() const
returns the rank of the protein hit
const DateTime & getDateTime() const
Returns the date of the protein identification run.
std::ifstream infile
Questionable file tested by TEST_FILE_EQUAL.
QualityType getQuality() const
Non-mutable access to the overall quality.
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:62
Used to load and store idXML files.
Definition: IdXMLFile.h:63
static String typeToName(Type type)
Returns the name/extension of the type.
double getRT() const
returns the RT of the MS2 spectrum where the identification occurred
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:117
Representation of a peptide hit.
Definition: PeptideHit.h:55