Skip to content

Commit

Permalink
Merge pull request #2 from OpenMS/develop
Browse files Browse the repository at this point in the history
Update my fork
  • Loading branch information
emilpaulitz authored Apr 30, 2021
2 parents cef0e0c + 5fe7aec commit e9a8010
Show file tree
Hide file tree
Showing 384 changed files with 7,567 additions and 4,864 deletions.
21 changes: 12 additions & 9 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
tasks:
- init: cp -r .vscode-gitpod .vscode && echo "Welcome!"
prebuild: git config -f .gitmodules submodule.THIRDPARTY.shallow true &&
git submodule update --init THIRDPARTY &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/All -type d -printf ":%p" ) &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/Linux/64bit -type d -printf ":%p" ) &&
mkdir -p build && pushd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH='/contrib-build/;/usr/;/usr/local' -DBOOST_USE_STATIC=OFF ../ && make -j16 && popd
command: export PATH=$PATH$( find ${PWD}/THIRDPARTY/All -type d -printf ":%p" ) &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/Linux/64bit -type d -printf ":%p" )
- init: >
cp -r .vscode-gitpod .vscode && echo "Welcome!"
git config -f .gitmodules submodule.THIRDPARTY.shallow true &&
git submodule update --init THIRDPARTY &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/All -type d -printf ":%p" ) &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/Linux/64bit -type d -printf ":%p" ) &&
mkdir -p build && pushd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH='/contrib-build/;/usr/;/usr/local' -DBOOST_USE_STATIC=OFF ../ &&
make -j16 && popd
command: >
export PATH=$PATH$( find ${PWD}/THIRDPARTY/All -type d -printf ":%p" ) &&
export PATH=$PATH$( find ${PWD}/THIRDPARTY/Linux/64bit -type d -printf ":%p" )
image:
file: .gitpod.Dockerfile
github:
Expand Down Expand Up @@ -37,4 +40,4 @@ vscode:
- cschlosser.doxdocgen@0.7.2:g0DIKlW09t+j2Xi04fzrAA==
- hbenl.vscode-test-explorer@2.19.2:8rKHUShFJJd0UivektEkng==
- fredericbonnet.cmake-test-adapter@0.10.0:Fb9mp0fAtp8s6LKtpzJAyw==
- notskm.clang-tidy@0.5.1:+QMYmPGGWj0QCN6sba42Vw==
- notskm.clang-tidy@0.5.1:+QMYmPGGWj0QCN6sba42Vw==
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ the authors tag in the respective file header.
- Daniel Jameson
- Darren Kessner
- David Wojnar
- David Voigt
- Dilek Dere
- Dimitri Schachmann
- Dominik Schmitz
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Adapters/Third-party support:
- Added basic Triqler export
- ParamEditor with more convenient StringList editing (#5135)
- TOPPAS: add a `recent files` submenu
- removed InspectAdapter

Further fixes:
- support for GLPK 5.x (#5127)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ OpenMS
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/93e71bad214f46d2a534ec92dbc2efc9)](https://www.codacy.com/app/OpenMS/OpenMS?utm_source=github.com&utm_medium=referral&utm_content=OpenMS/OpenMS&utm_campaign=badger)
[![Build Status](https://travis-ci.org/OpenMS/OpenMS.svg?branch=develop)](https://travis-ci.org/OpenMS/OpenMS)
[![Project Stats](https://www.openhub.net/p/open-ms/widgets/project_thin_badge.gif)](https://www.openhub.net/p/open-ms)
![Discord Shield](https://discordapp.com/api/guilds/832282841836159006/widget.png?style=shield)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/OpenMS/OpenMS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/openms-meta/README.html)
[![documentation](https://codedocs.xyz/doxygen/doxygen.svg)](https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/index.html)
Expand Down Expand Up @@ -38,7 +39,7 @@ Berlin, and the ETH Zürich.

Features
--------
- Core C++ library under three-clause BSD licence using modern C++11
- Core C++ library under three-clause BSD licence using modern C++17
- Python bindings to the C++ API through pyOpenMS
- Major community file formats supported (mzML, mzXML, mzIdentXML, pepXML etc)
- Over 150+ individual analysis tools (TOPP Tools), covering most MS and LC-MS data processing and mining tasks
Expand Down
3 changes: 2 additions & 1 deletion doc/code_examples/Tutorial_Param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//

#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/DATASTRUCTURES/Param.h>
#include <iostream>

Expand All @@ -43,7 +44,7 @@ Int main()
param.setValue("file:data:min_int", 0);
param.setValue("file:data:max_int", 16459);

cout << "Name : " << (String)(param.getValue("file:name")) << endl;
cout << "Name : " << (string)(param.getValue("file:name")) << endl;
cout << "Size : " << (float)(param.getValue("file:size(MB)")) << endl;
cout << "Min int: " << (UInt)(param.getValue("file:data:min_int")) << endl;
cout << "Max int: " << (UInt)(param.getValue("file:data:max_int")) << endl;
Expand Down
22 changes: 14 additions & 8 deletions doc/doxygen/parameters/DefaultParamHandlerDocumenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,22 @@ void writeParameters(const String& class_name, const Param& param, bool table_on
ofstream f((String("output/OpenMS_") + class_name + ".parameters").c_str());

if (!table_only)
{
f << "<B>Parameters of this class are:</B><BR><BR>\n";
}
f << "<table border=\"1\" style=\"border-style:solid; border-collapse:collapse; border-color:#c0c0c0;\" width=\"100%\" cellpadding=\"4\">" << endl;
f << "<tr style=\"border-bottom:1px solid black; background:#fffff0\"><th>Name</th><th>Type</th><th>Default</th><th>Restrictions</th><th>Description</th></tr>" << endl;
String type, description, restrictions;
for (Param::ParamIterator it = param.begin(); it != param.end(); ++it)
{
restrictions = "";
if (it->value.valueType() == DataValue::INT_VALUE || it->value.valueType() == DataValue::INT_LIST)
if (it->value.valueType() == ParamValue::INT_VALUE || it->value.valueType() == ParamValue::INT_LIST)
{
type = "int";
if (it->value.valueType() == DataValue::INT_LIST)
if (it->value.valueType() == ParamValue::INT_LIST)
{
type += " list";
}

//restrictions
bool first = true;
Expand All @@ -212,14 +216,16 @@ void writeParameters(const String& class_name, const Param& param, bool table_on
if (it->max_int != (numeric_limits<Int>::max)())
{
if (!first)
{
restrictions += ' ';
}
restrictions += String("max: ") + it->max_int;
}
}
else if (it->value.valueType() == DataValue::DOUBLE_VALUE || it->value.valueType() == DataValue::DOUBLE_LIST)
else if (it->value.valueType() == ParamValue::DOUBLE_VALUE || it->value.valueType() == ParamValue::DOUBLE_LIST)
{
type = "float";
if (it->value.valueType() == DataValue::DOUBLE_LIST)
if (it->value.valueType() == ParamValue::DOUBLE_LIST)
type += " list";

//restrictions
Expand All @@ -236,10 +242,10 @@ void writeParameters(const String& class_name, const Param& param, bool table_on
restrictions += String("max: ") + it->max_float;
}
}
else if (it->value.valueType() == DataValue::STRING_VALUE || it->value.valueType() == DataValue::STRING_LIST)
else if (it->value.valueType() == ParamValue::STRING_VALUE || it->value.valueType() == ParamValue::STRING_LIST)
{
type = "string";
if (it->value.valueType() == DataValue::STRING_LIST)
if (it->value.valueType() == ParamValue::STRING_LIST)
type += " list";

//restrictions
Expand Down Expand Up @@ -289,7 +295,7 @@ void writeParameters(const String& class_name, const Param& param, bool table_on
}

//replace # and @ in values
String value = it->value;
String value = it->value.toString(true);
value.substitute("@", "XXnot_containedXX");
value.substitute("XXnot_containedXX", "@@");
value.substitute("#", "XXnot_containedXX");
Expand Down Expand Up @@ -480,7 +486,7 @@ int main(int argc, char** argv)
// some classes require a QApplication
QApplication app(argc, argv);

DOCME(TOPPViewBase);
DOCME2(TOPPViewBase, TOPPViewBase(TOPPViewBase::TOOL_SCAN::SKIP_SCAN));
DOCME(TOPPASBase);

DOCME2(Plot1DCanvas, Plot1DCanvas(Param(), nullptr));
Expand Down
16 changes: 8 additions & 8 deletions doc/doxygen/parameters/TOPPDocumenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void convertINI2HTML(const Param& p, ostream& os)
s_attr += " item_advanced"; // optionally add advanced class
if (it->tags.find("required") != it->tags.end())
s_req += " item_required"; // optionally add required class
DataValue::DataType value_type = it->value.valueType();
ParamValue::ValueType value_type = it->value.valueType();
//write opening tag
os << indentation
<< "<div class=\"item"
Expand All @@ -123,7 +123,7 @@ void convertINI2HTML(const Param& p, ostream& os)

//tags
String list;
for (set<String>::const_iterator tag_it = it->tags.begin(); tag_it != it->tags.end(); ++tag_it)
for (auto tag_it = it->tags.begin(); tag_it != it->tags.end(); ++tag_it)
{
if (*tag_it == "advanced")
continue; // do not list "advanced" or "required" (this is done by color coding)
Expand All @@ -139,8 +139,8 @@ void convertINI2HTML(const Param& p, ostream& os)
String restrictions = "";
switch (value_type)
{
case DataValue::INT_VALUE:
case DataValue::INT_LIST:
case ParamValue::INT_VALUE:
case ParamValue::INT_LIST:
{
bool min_set = (it->min_int != -numeric_limits<Int>::max());
bool max_set = (it->max_int != numeric_limits<Int>::max());
Expand All @@ -159,8 +159,8 @@ void convertINI2HTML(const Param& p, ostream& os)
}
break;

case DataValue::DOUBLE_VALUE:
case DataValue::DOUBLE_LIST:
case ParamValue::DOUBLE_VALUE:
case ParamValue::DOUBLE_LIST:
{
bool min_set = (it->min_float != -numeric_limits<double>::max());
bool max_set = (it->max_float != numeric_limits<double>::max());
Expand All @@ -179,8 +179,8 @@ void convertINI2HTML(const Param& p, ostream& os)
}
break;

case DataValue::STRING_VALUE:
case DataValue::STRING_LIST:
case ParamValue::STRING_VALUE:
case ParamValue::STRING_LIST:
if (it->valid_strings.size() != 0)
{
restrictions.concatenate(it->valid_strings.begin(), it->valid_strings.end(), ",");
Expand Down
1 change: 0 additions & 1 deletion doc/doxygen/public/TOPP.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
- @subpage TOPP_CompNovo - Performs a peptide/protein identification with the CompNovo engine.
- @subpage TOPP_CompNovoCID - Performs a peptide/protein identification with the CompNovo engine in CID mode.
- @subpage TOPP_CruxAdapter - Identifies peptides in MS/MS spectra via Crux and tide-search (external).
- @subpage TOPP_InspectAdapter - Identifies MS/MS spectra using Inspect (external).
- @subpage TOPP_MascotAdapter - Identifies MS/MS spectra using Mascot (external).
- @subpage TOPP_MascotAdapterOnline - Identifies MS/MS spectra using Mascot (external).
- @subpage TOPP_MSGFPlusAdapter - Identifies MS/MS spectra using MSGFPlus (external).
Expand Down
1 change: 0 additions & 1 deletion doc/doxygen/public/UTILS.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
- @subpage UTILS_PeakPickerIterative - A tool for peak detection in profile data.

<b>File Handling</b>
- @subpage UTILS_CVInspector - A tool for visualization and validation of PSI mapping and CV files.
- @subpage UTILS_FuzzyDiff - Compares two files, tolerating numeric differences.
- @subpage UTILS_IDSplitter - Splits protein/peptide identifications off of annotated data files.
- @subpage UTILS_MzMLSplitter - Splits an mzML file into multiple parts.
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/openms/include/OpenMS/ANALYSIS/ID/PeptideIndexing.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ namespace OpenMS

if ((stats_count_m_d + stats_count_m_td) == 0)
{
String msg("No peptides were matched to the decoy portion of the database! Did you provide the correct concatenated database? Are your 'decoy_string' (=" + String(decoy_string_) + ") and 'decoy_string_position' (=" + String(param_.getValue("decoy_string_position")) + ") settings correct?");
String msg("No peptides were matched to the decoy portion of the database! Did you provide the correct concatenated database? Are your 'decoy_string' (=" + decoy_string_ + ") and 'decoy_string_position' (=" + std::string(param_.getValue("decoy_string_position")) + ") settings correct?");
if (missing_decoy_action_ == MissingDecoy::IS_ERROR)
{
OPENMS_LOG_ERROR << "Error: " << msg << "\nSet 'missing_decoy_action' to 'warn' if you are sure this is ok!\nAborting ..." << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ namespace OpenMS
explicit ParameterModifier(const String &param_name, SiriusAdapterAlgorithm *enclose) :
openms_param_name(param_name), enclose(enclose) {}

void withValidStrings(initializer_list<String> choices)
void withValidStrings(initializer_list<std::string> choices)
{
enclose->defaults_.setValidStrings(openms_param_name, choices);
}
Expand All @@ -219,7 +219,7 @@ namespace OpenMS
protected:
ParameterModifier parameter(
const String &parameter_name,
const DataValue &default_value,
const ParamValue &default_value,
const String &parameter_description);
void flag(
const String &parameter_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#pragma once

#include <OpenMS/DATASTRUCTURES/Param.h>
#include <OpenMS/DATASTRUCTURES/ListUtils.h>
#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModel.h>
#include <iostream>
#include <map>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#pragma once

#include <OpenMS/DATASTRUCTURES/Param.h>
#include <OpenMS/DATASTRUCTURES/String.h>
#include <OpenMS/KERNEL/StandardTypes.h>

#include <tuple>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
#include <OpenMS/DATASTRUCTURES/String.h>
#include <OpenMS/DATASTRUCTURES/ListUtils.h>

#include <OpenMS/KERNEL/Peak2D.h>

Expand Down Expand Up @@ -146,7 +147,7 @@ namespace OpenMS
@param stringlist The StringList to convert.
@return An isotope correction matrix as Matrix<double>.
*/
Matrix<double> stringListToIsotopCorrectionMatrix_(const StringList& stringlist) const;
Matrix<double> stringListToIsotopCorrectionMatrix_(const std::vector<String>& stringlist) const;
};
} // namespace

Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace OpenMS
Size reference_channel_;

/// List of available channel names as they are presented to the user
static const std::vector<String> channel_names_;
static const std::vector<std::string> channel_names_;

protected:
/// implemented for DefaultParamHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace OpenMS
Size reference_channel_;

/// List of available channel names as they are presented to the user
static const std::vector<String> channel_names_;
static const std::vector<std::string> channel_names_;

protected:
/// implemented for DefaultParamHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace OpenMS
Size reference_channel_;

/// List of available channel names as they are presented to the user
static const std::vector<String> channel_names_;
static const std::vector<std::string> channel_names_;

protected:
/// implemented for DefaultParamHandler
Expand Down
2 changes: 1 addition & 1 deletion src/openms/include/OpenMS/APPLICATIONS/MapAlignerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class TOPPMapAlignerBase :
Param params;
params.setValue("type", default_model, "Type of model");
// TODO: avoid referring to each TransformationModel subclass explicitly
StringList model_types = ListUtils::create<String>("linear,b_spline,lowess,interpolated");
std::vector<std::string> model_types = {"linear","b_spline","lowess","interpolated"};
if (!ListUtils::contains(model_types, default_model))
{
model_types.insert(model_types.begin(), default_model);
Expand Down
2 changes: 1 addition & 1 deletion src/openms/include/OpenMS/APPLICATIONS/OpenSwathBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class TOPPOpenSwathBase :
model_params.setValue("symmetric_regression", "false");
model_params.setValue("span", irt_detection_param.getValue("lowess:span"));
model_params.setValue("num_nodes", irt_detection_param.getValue("b_spline:num_nodes"));
String model_type = irt_detection_param.getValue("alignmentMethod");
String model_type = irt_detection_param.getValue("alignmentMethod").toString();
trafo_rtnorm.fitModel(model_type, model_params);
}
else if (!irt_tr_file.empty())
Expand Down
8 changes: 4 additions & 4 deletions src/openms/include/OpenMS/APPLICATIONS/ParameterInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <OpenMS/DATASTRUCTURES/String.h>
#include <OpenMS/DATASTRUCTURES/StringListUtils.h>
#include <OpenMS/DATASTRUCTURES/DataValue.h>
#include <OpenMS/DATASTRUCTURES/ParamValue.h>

namespace OpenMS
{
Expand Down Expand Up @@ -70,7 +70,7 @@ namespace OpenMS
/// type of the parameter
ParameterTypes type;
/// default value of the parameter stored as string
DataValue default_value;
ParamValue default_value;
/// description of the parameter
String description;
/// argument in the description
Expand All @@ -84,15 +84,15 @@ namespace OpenMS

///@name Restrictions for different parameter types
//@{
std::vector<String> valid_strings;
StringList valid_strings;
Int min_int;
Int max_int;
double min_float;
double max_float;
//@}

/// Constructor that takes all members in declaration order
ParameterInformation(const String& n, ParameterTypes t, const String& arg, const DataValue& def, const String& desc, bool req, bool adv, const StringList& tag_values = StringList());
ParameterInformation(const String& n, ParameterTypes t, const String& arg, const ParamValue& def, const String& desc, bool req, bool adv, const StringList& tag_values = StringList());

ParameterInformation();

Expand Down
4 changes: 2 additions & 2 deletions src/openms/include/OpenMS/APPLICATIONS/TOPPBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ namespace OpenMS
bool getParamAsBool_(const String& key) const;

/**
@brief Return the value @p key of parameters as DataValue. DataValue::EMPTY indicates that a parameter was not found.
@brief Return the value @p key of parameters as DataValue. ParamValue::EMPTY indicates that a parameter was not found.
Parameters are searched in this order:
-# command line
Expand All @@ -364,7 +364,7 @@ namespace OpenMS
where "some_key" == key in the examples.
*/
const DataValue& getParam_(const String& key) const;
const ParamValue& getParam_(const String& key) const;

/**
@brief Get the part of a parameter name that makes up the subsection
Expand Down
Loading

0 comments on commit e9a8010

Please sign in to comment.