 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
38 #include <OpenMS/config.h>
82 const String& getPath()
const;
93 static String getExecutablePath();
96 static bool exists(
const String& file);
99 static bool empty(
const String& file);
102 static bool executable(
const String& file);
118 static bool rename(
const String& from,
const String& to,
bool overwrite_existing =
true,
bool verbose =
true);
137 static bool copyDirRecursively(
const QString &from_dir,
const QString &to_dir,
File::CopyOptions option = CopyOptions::OVERWRITE);
147 static bool removeDirRecursively(
const String& dir_name);
150 static bool removeDir(
const QString& dir_name);
167 static bool readable(
const String& file);
170 static bool writable(
const String& file);
173 static bool isDirectory(
const String& path);
193 static bool fileList(
const String& dir,
const String& file_pattern,
StringList& output,
bool full_path =
false);
219 static String getUniqueName(
bool include_hostname =
true);
222 static String getOpenMSDataPath();
225 static String getOpenMSHomePath();
232 static String getTempDirectory();
239 static String getUserDirectory();
246 static Param getSystemParameters();
263 static StringList getPathLocations(
const String& path = std::getenv(
"PATH"));
286 static String findSiblingTOPPExecutable(
const String& toolName);
304 static String getTemporaryFile(
const String& alternative_file =
"");
326 static bool validateMatchingFileNames(
const StringList& sl1,
const StringList& sl2,
bool basename =
true,
bool ignore_extension =
true,
bool strict =
false);
330 static Param getSystemParameterDefaults_();
333 static bool isOpenMSDataPath_(
const String& path);
335 #ifdef OPENMS_WINDOWSPLATFORM
346 static StringList executableExtensions_(
const String& ext = std::getenv(
"PATHEXT"));
bool keep_dir_
Definition: File.h:86
Base class for TOPP applications.
Definition: TOPPBase.h:147
Resolves shared peptides based on protein scores.
Definition: PeptideProteinResolution.h:79
Basic file handling operations.
Definition: File.h:53
Internal helper class, which holds temporary filenames and deletes these files at program exit.
Definition: File.h:352
const std::vector< ProteinGroup > & getIndistinguishableProteins() const
Returns the indistinguishable proteins.
@TODO loop over all runs
Definition: BayesianProteinInferenceAlgorithm.h:98
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
void setInferenceEngine(const String &search_engine)
Sets the inference engine type.
A more convenient string class.
Definition: String.h:58
std::vector< String > accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition: ProteinIdentification.h:134
Representation of a protein hit.
Definition: ProteinHit.h:58
String toString(bool full_precision=true) const
Conversion to String full_precision Controls number of fractional digits for all double types or list...
std::vector< ProteinHit >::iterator findHit(const String &accession)
Finds a protein hit by accession (returns past-the-end iterator if not found)
String toUnmodifiedString() const
returns the peptide as string without any modifications or (e.g., "PEPTIDER")
static String getUniqueName(bool include_hostname=true)
Returns a string, consisting of date, time, hostname, process id, and a incrementing number....
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
Representation of a protein identification run.
Definition: ProteinIdentification.h:70
static TemporaryFiles_ temporary_files_
private list of temporary filenames, which are deleted upon program exit
Definition: File.h:369
static DateTime now()
Returns the current date and time.
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
String chop(Size n) const
Returns a substring where n characters were removed from the end of the string.
static bool hasPrefix(const String &this_s, const String &string)
Definition: StringUtilsSimple.h:111
const String & getIdentifier() const
Returns the identifier.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
static void removeUnreferencedProteins(ConsensusMap &cmap, bool include_unassigned)
static String & remove(String &this_s, char what)
Definition: StringUtilsSimple.h:595
void setScoreType(const String &type)
Sets the protein score type.
const std::vector< ProteinHit > & getHits() const
Returns the protein hits.
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
CopyOptions
Copy directory recursively.
Definition: File.h:136
std::mutex mtx_
Definition: File.h:364
QString toQString() const
Conversion to Qt QString.
bool hasSuffix(const String &string) const
true if String ends with string, false otherwise
std::set< String > extractProteinAccessionsSet() const
extracts the set of non-empty protein accessions from peptide evidences
void resolveGraph(ProteinIdentification &protein, std::vector< PeptideIdentification > &peptides)
bool empty() const
check if sequence is empty
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void insertHit(const ProteinHit &input)
Appends a protein hit.
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:71
void buildGraph(ProteinIdentification &protein, const std::vector< PeptideIdentification > &peptides, bool skip_sort=false)
void setSearchEngine(const String &search_engine)
Sets the search engine type.
int verbose
Verbosity level ( "-v" is 1 and "-V" is 2 )
StringList filenames_
Definition: File.h:363
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
Class representing a temporary directory.
Definition: File.h:64
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:63
String substr(size_t pos=0, size_t n=npos) const
Wrapper for the STL substr() method. Returns a String object with its contents initialized to a subst...
double getScore() const
returns the PSM score
static String number(double d, UInt n)
Definition: StringUtils.h:196
void setHigherScoreBetter(bool higher_is_better)
Sets the orientation of the score (is higher better?)
void setDateTime(const DateTime &date)
Sets the date of the protein identification run.
Management and storage of parameters / INI files.
Definition: Param.h:69
static String getTempDirectory()
String & remove(char what)
Remove all occurrences of the character what.
const String & getScoreType() const
Returns the protein score type.
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
void setIdentifier(const String &id)
Sets the identifier.
static bool removeDirRecursively(const String &dir_name)
Removes the subdirectories of the specified directory (absolute path). Returns true if successful.
double probability
Probability of this group.
Definition: ProteinIdentification.h:131
String temp_dir_
Definition: File.h:85
Used to load and store idXML files.
Definition: IdXMLFile.h:68
String & toLower()
Converts the string to lowercase.
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:117
Representation of a peptide hit.
Definition: PeptideHit.h:55