Skip to content

Commit

Permalink
fix bug in featureXML schema (OpenMS#5481)
Browse files Browse the repository at this point in the history
* Code Arrangement Changes #7 (OpenMS#5471)

* Code Arrangement Changes #7

* Update ClusterAnalyzer.cpp

Co-authored-by: Arraxx <kumaramanjha2901@gmail.com>

* Added wrap-doc methods #10 (OpenMS#5467)

* Added wrap-doc methods #10

* Added wrap-doc methods #7 (OpenMS#5445)

* Wrap-doc methods added #7

* Added wrap-doc methods #11 (OpenMS#5468)

* Added wrap-doc methods #11

* Added wrap-doc methods #9 (OpenMS#5465)

* Added wrap-doc methods #9

* minor fixes (OpenMS#5474)

* Adding Wrap Doc Method (OpenMS#5389)

* add wrap doc #1

* Added wrap-doc methods #8 (OpenMS#5459)

* Added wrap-doc methods #8

* Code Arrangement Changes #8 (OpenMS#5476)

Co-authored-by: Arraxx <kumaramanjha2901@gmail.com>

* fix bug in featureXML schema

* fix bug in 1.8 schema

Co-authored-by: Samuel Wein <sam@samwein.com>
Co-authored-by: Aman Kumar <54955755+Arraxx@users.noreply.github.com>
Co-authored-by: Arraxx <kumaramanjha2901@gmail.com>
Co-authored-by: Rahul Agrawal <41531498+rahul799@users.noreply.github.com>
Co-authored-by: Oliver Alka <randalthor89@gmx.net>
  • Loading branch information
6 people committed Aug 12, 2021
1 parent 74b33e0 commit 894e707
Show file tree
Hide file tree
Showing 230 changed files with 3,235 additions and 1,602 deletions.
2 changes: 1 addition & 1 deletion share/OpenMS/SCHEMAS/FeatureXML_1_8.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
<xs:documentation>significance threshold as calculated by the search engine</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="spectrum_reference" type="xs:unsignedInt">
<xs:attribute name="spectrum_reference" type="xs:string">
<xs:annotation>
<xs:documentation>Integer reference number of the identified spectrum (or feature)</xs:documentation>
</xs:annotation>
Expand Down
2 changes: 1 addition & 1 deletion share/OpenMS/SCHEMAS/FeatureXML_1_9.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
<xs:documentation>significance threshold as calculated by the search engine</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="spectrum_reference" type="xs:unsignedInt">
<xs:attribute name="spectrum_reference" type="xs:string">
<xs:annotation>
<xs:documentation>Integer reference number of the identified spectrum (or feature)</xs:documentation>
</xs:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ namespace OpenMS
The formula is obtained from "The importance of accurately correcting for the natural abundance of stable isotopes",
Midani et al, doi:10.1016/j.ab.2016.12.011
@param[in] normalized_feature Feature with normalized values for each component and unlabeled chemical formula for each component group.
@param[in] correction_matrix Square matrix holding correction factors derived either experimentally or theoretically which describe how spectral peaks of
@param normalized_feature Feature with normalized values for each component and unlabeled chemical formula for each component group.
@param correction_matrix Square matrix holding correction factors derived either experimentally or theoretically which describe how spectral peaks of
naturally abundant 13C contribute to spectral peaks that overlap (or convolve) the spectral peaks of the corrected MDV of the derivatization agent.
@param[in] correction_matrix_agent name of the derivatization agent, the internally stored correction matrix if the name of the agent is supplied,
@param correction_matrix_agent name of the derivatization agent, the internally stored correction matrix if the name of the agent is supplied,
only "TBDMS" is supported for now.
@param[out] corrected_feature Feature with corrected values for each component.
@return corrected_feature Feature with corrected values for each component.
*/
void isotopicCorrection(
const Feature& normalized_feature, Feature& corrected_feature,
Expand All @@ -117,12 +117,12 @@ namespace OpenMS
The formula is obtained from "The importance of accurately correcting for the natural abundance of stable isotopes",
Midani et al, doi:10.1016/j.ab.2016.12.011
@param[in] normalized_featuremap FeatureMap with normalized values for each component and unlabeled chemical formula for each component group.
@param[in] correction_matrix Square matrix holding correction factors derived either experimentally or theoretically which describe how spectral peaks of
@param normalized_featuremap FeatureMap with normalized values for each component and unlabeled chemical formula for each component group.
@param correction_matrix Square matrix holding correction factors derived either experimentally or theoretically which describe how spectral peaks of
naturally abundant 13C contribute to spectral peaks that overlap (or convolve) the spectral peaks of the corrected MDV of the derivatization agent.
@param[in] correction_matrix_agent name of the derivatization agent, the internally stored correction matrix if the name of the agent is supplied,
@param correction_matrix_agent name of the derivatization agent, the internally stored correction matrix if the name of the agent is supplied,
only "TBDMS" is supported for now.
@param[out] corrected_featuremap FeatureMap with corrected values for each component.
@return corrected_featuremap FeatureMap with corrected values for each component.
*/
void isotopicCorrections(
const FeatureMap& normalized_featureMap, FeatureMap& corrected_featureMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace OpenMS
const String& file_residuals_plot = "",
const String& rscript_executable = "Rscript");

/*
/**
@brief Transform a precursor's m/z
Calibrate m/z of precursors.
Expand All @@ -210,7 +210,7 @@ namespace OpenMS
*/
static void applyTransformation(std::vector<Precursor>& pcs, const MZTrafoModel& trafo);

/*
/**
@brief Transform a spectrum (data+precursor)
See applyTransformation(MSExperiment, ...) for details.
Expand All @@ -221,7 +221,7 @@ namespace OpenMS
*/
static void applyTransformation(PeakMap::SpectrumType& spec, const IntList& target_mslvl, const MZTrafoModel& trafo);

/*
/**
@brief Transform spectra from a whole map (data+precursor)
All data peaks and precursor information (if present) are calibrated in m/z.
Expand Down Expand Up @@ -290,7 +290,7 @@ namespace OpenMS
/// determine if sequence is within tol_ppm and update stats; fills mz_ref with the theoretical m/z of the sequence
bool isDecalibrated_(const PeptideIdentification& pep_id, const double mz_obs, const double tol_ppm, CalibrantStats_& stats, double& mz_ref);

/*
/**
@brief Calibrate m/z of a spectrum, ignoring precursors!
This method is not exposed as public, because its easy to be misused on spectra while forgetting about the precursors of high-level spectra.
Expand Down
4 changes: 2 additions & 2 deletions src/openms/include/OpenMS/FORMAT/InspectOutfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ namespace OpenMS
}

/**
get the search engine and its version from the output of the InsPecT executable without parameters
@brief get the search engine and its version from the output of the InsPecT executable without parameters
returns true on success, false otherwise
*/
bool getSearchEngineAndVersion(const String & cmd_output, ProteinIdentification & protein_identification);

/** read the header of an inspect output file and retrieve various information
/** @brief read the header of an inspect output file and retrieve various information
@throw Exception::ParseError
*/
void readOutHeader(const String & filename, const String & header_line, Int & spectrum_file_column, Int & scan_column, Int & peptide_column, Int & protein_column, Int & charge_column, Int & MQ_score_column, Int & p_value_column, Int & record_number_column, Int & DB_file_pos_column, Int & spec_file_pos_column, Size & number_of_columns);
Expand Down
2 changes: 1 addition & 1 deletion src/openms/include/OpenMS/KERNEL/ChromatogramTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace OpenMS
/// @name Accessors
//@{
/**
@brief converts the chromatogram to a list of spectra with instrument settings SRM
@brief converts the chromatogram to a list of spectra with instrument settings
This conversion may be necessary as most of the spectra formats do not support
chromatograms, except of mzML. However, most formats support e.g. SRM chromatogram
Expand Down
6 changes: 0 additions & 6 deletions src/openms/include/OpenMS/MATH/MISC/BSpline2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ namespace OpenMS
*/
double derivative(const double x) const;

/**
* Return the first derivative of the spline curve at the given @p x.
* Returns zero if the current state is not ok().
*/
double derivatives(double x, unsigned order = 1) const;

/**
* Return whether the spline fit was successful.
*/
Expand Down
7 changes: 7 additions & 0 deletions src/openms/include/OpenMS/MATH/MISC/CubicSpline2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ namespace OpenMS
*/
double eval(double x) const;

/**
* @brief evaluates first derivative of spline at position x
*
* @param x x-position
*/
double derivative(double x) const;

/**
* @brief evaluates derivative of spline at position x
*
Expand Down
14 changes: 7 additions & 7 deletions src/openms/include/OpenMS/MATH/MISC/LinearInterpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace OpenMS
}
}

/**@brief Performs linear resampling. The arg_value is split up and
/** @brief Performs linear resampling. The arg_value is split up and
added to the data points around arg_pos.
*/
void addValue(KeyType arg_pos, ValueType arg_value)
Expand Down Expand Up @@ -237,7 +237,7 @@ namespace OpenMS
}
}

/**@brief Returns the interpolated derivative.
/** @brief Returns the interpolated derivative.
Please drop me (= the maintainer) a message if you are using this.
*/
Expand Down Expand Up @@ -321,7 +321,7 @@ namespace OpenMS
return data_;
}

/**@brief Assigns data to the internal random access container from
/** @brief Assigns data to the internal random access container from
which interpolated values are being sampled.
SourceContainer must be assignable to ContainerType.
Expand Down Expand Up @@ -374,7 +374,7 @@ namespace OpenMS
return scale_;
}

/**@brief Accessor. "Scale" is the difference (in "outside" units) between consecutive entries in "Data".
/** @brief Accessor. "Scale" is the difference (in "outside" units) between consecutive entries in "Data".
<b>Note:</b> Using this invalidates the inside and outside reference
points.
Expand All @@ -401,8 +401,8 @@ namespace OpenMS
offset_ = offset;
}

/**@brief Specifies the mapping from "outside" to "inside" coordinates by the following data:
- <code>scale</code>: the difference in outside coordinates between consecutive values in the data vector.
/** @brief Specifies the mapping from "outside" to "inside" coordinates by the following data:
- <code>scale</code>: the difference in outside coordinates between consecutive values in the data vector.
- <code>inside</code> and <code>outside</code>: these x-axis positions are mapped onto each other.
For example, when you have a complicated probability distribution
Expand All @@ -422,7 +422,7 @@ namespace OpenMS
offset_ = outside - scale * inside;
}

/**@brief Specifies the mapping from "outside" to "inside" coordinates by the following data:
/** @brief Specifies the mapping from "outside" to "inside" coordinates by the following data:
- <code>inside_low</code> and <code>outside_low</code>: these axis positions are mapped onto each other.
- <code>inside_high</code> and <code>outside_high</code>: these axis positions are mapped onto each other.
Expand Down
2 changes: 1 addition & 1 deletion src/openms/include/OpenMS/MATH/MISC/SplineBisection.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace OpenMS
do
{
double mid = (lefthand + righthand) / 2.0;
double midpoint_deriv_val = peak_spline.derivatives(mid, 1);
double midpoint_deriv_val = peak_spline.derivative(mid);

// if deriv nearly zero then maximum already found
if (!(std::fabs(midpoint_deriv_val) > eps))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,44 @@ namespace OpenMS


/** @brief Returns the value of the isotope wavelet at position @p t. Usually, you do not need to call this function.
* Please use @see sampleTheWavelet instead.
*
* Note that this functions returns the pure function value of psi and not the normalized (average=0)
* value given by Psi.
* @param t The position at which the wavelet has to be drawn (within the coordinate system of the wavelet).
* @param m The m/z position within the signal (i.e. the mass not de-charged) within the signal.
* @param z The charge @p z we want to detect.
* @param mode Indicates whether positive mode (+1) or negative mode (-1) has been used for ionization. */
Please use @see sampleTheWavelet instead.
Note that this functions returns the pure function value of psi and not the normalized (average=0)
value given by Psi.
@param t The position at which the wavelet has to be drawn (within the coordinate system of the wavelet).
@param m The m/z position within the signal (i.e. the mass not de-charged) within the signal.
@param z The charge @p z we want to detect.
@param mode Indicates whether positive mode (+1) or negative mode (-1) has been used for ionization.
*/
static double getValueByMass(const double t, const double m, const UInt z, const Int mode = +1)
{
return getValueByLambda(getLambdaL(m * z - z * mode * Constants::IW_PROTON_MASS), t * z + 1);
}

/** @brief Returns the value of the isotope wavelet at position @p t via a fast table lookup.
* Usually, you do not need to call this function.
* Please use @see sampleTheWavelet instead.
*
* Note that this functions returns the pure function value of psi and not the normalized (average=0)
* value given by Psi.
* @param lambda The mass-parameter lambda.
* @param tz1 t (the position) times the charge (z) plus 1. */
Usually, you do not need to call this function.
Please use @see sampleTheWavelet instead.
Note that this functions returns the pure function value of psi and not the normalized (average=0)
value given by Psi.
@param lambda The mass-parameter lambda.
@param tz1 t (the position) times the charge (z) plus 1.
*/
static double getValueByLambda(const double lambda, const double tz1);

/** @brief Returns the value of the isotope wavelet at position @p t.
* This function is usually significantly slower than the table lookup performed in @see getValueByLambda.
* Nevertheless, it might be necessary to call this function due to extrapolating reasons caused by the
* alignment of the wavelet.
*
* Usually, you do not need to call this function.
* Please use @see sampleTheWavelet instead.
*
* Note that this functions returns the pure function value of psi and not the normalized (average=0)
* value given by Psi.
* @param lambda The mass-parameter lambda.
* @param tz1 t (the position) times the charge (z) plus 1. */
This function is usually significantly slower than the table lookup performed in @see getValueByLambda.
Nevertheless, it might be necessary to call this function due to extrapolating reasons caused by the
alignment of the wavelet.
Usually, you do not need to call this function.
Please use @see sampleTheWavelet instead.
Note that this functions returns the pure function value of psi and not the normalized (average=0)
value given by Psi.
@param lambda The mass-parameter lambda.
@param tz1 t (the position) times the charge (z) plus 1.
*/
static double getValueByLambdaExtrapol(const double lambda, const double tz1);

static double getValueByLambdaExact(const double lambda, const double tz1);
Expand All @@ -118,18 +121,20 @@ namespace OpenMS
}

/** @brief Returns the table_steps_ parameter.
*
* This is an internally used parameter controlling the precision of several pre-sampling steps.
* Normally, this parameter can be left unchanged. */
This is an internally used parameter controlling the precision of several pre-sampling steps.
Normally, this parameter can be left unchanged.
*/
static double getTableSteps()
{
return table_steps_;
}

/** @brief Returns the inv_table_steps_ parameter.
*
* This is an internally used parameter controlling the precision of several pre-sampling steps.
* Normally, this parameter can be left unchanged. */
This is an internally used parameter controlling the precision of several pre-sampling steps.
Normally, this parameter can be left unchanged.
*/
static double getInvTableSteps()
{
return inv_table_steps_;
Expand All @@ -147,9 +152,10 @@ namespace OpenMS


/** @brief Computes the averagine isotopic distribution we would expect at the de-convoluted mass.
* @param m The de-convoluted mass m.
* @param size Returns the number of significant peaks within a pattern occurring at mass @p m.
* @return The isotopic distribution. */
@param m The de-convoluted mass m.
@param size Returns the number of significant peaks within a pattern occurring at mass @p m.
@return The isotopic distribution.
*/
static const IsotopeDistribution::ContainerType & getAveragine(const double m, UInt * size = nullptr);


Expand Down Expand Up @@ -195,13 +201,14 @@ namespace OpenMS


/** @brief Should be called once before values are drawn from the isotope wavelet function.
* The function is automatically called by the public constructor.
*
* The function pre-computes the expensive gamma function. Parameters related to this function are:
* @see max_charge_ and @see peak_cutoff_. If both of these are set correctly @see getValue will never compute
* the gamma function online.
*
* @param max_m The maximal de-convoluted mass that occurs in the current data set. */
The function is automatically called by the public constructor.
The function pre-computes the expensive gamma function. Parameters related to this function are:
@see max_charge_ and @see peak_cutoff_. If both of these are set correctly @see getValue will never compute
the gamma function online.
@param max_m The maximal de-convoluted mass that occurs in the current data set.
*/
static void preComputeExpensiveFunctions_(const double max_m);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ namespace OpenMS

/** @brief Computes a linear (intensity) interpolation.
* @param mz_a The m/z value of the point left to the query.
* @param mz_a The intensity value of the point left to the query.
* @param intens_a The intensity value of the point left to the query.
* @param mz_pos The query point.
* @param mz_b The m/z value of the point right to the query.
* @param intens_b The intensity value of the point left to the query. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@
#include <OpenMS/CHEMISTRY/MASSDECOMPOSITION/IMS/IMSAlphabet.h>
#include <OpenMS/CHEMISTRY/MASSDECOMPOSITION/IMS/IMSAlphabetTextParser.h>

namespace OpenMS
namespace OpenMS::ims
{

namespace ims
{

const IMSAlphabet::name_type & IMSAlphabet::getName(size_type index) const
{
return getElement(index).getName();
Expand Down Expand Up @@ -174,5 +171,4 @@ namespace OpenMS
return os;
}

} // namespace ims
} // namespace OpenMS
} // namespace OpenMS // namespace ims

0 comments on commit 894e707

Please sign in to comment.