diff --git a/src/openms/include/OpenMS/MATH/MISC/LinearInterpolation.h b/src/openms/include/OpenMS/MATH/MISC/LinearInterpolation.h index 6dff9f25e69..bb4314d61ee 100644 --- a/src/openms/include/OpenMS/MATH/MISC/LinearInterpolation.h +++ b/src/openms/include/OpenMS/MATH/MISC/LinearInterpolation.h @@ -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) @@ -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. */ @@ -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. @@ -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". Note: Using this invalidates the inside and outside reference points. @@ -401,8 +401,8 @@ namespace OpenMS offset_ = offset; } - /**@brief Specifies the mapping from "outside" to "inside" coordinates by the following data: - - scale: 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: + - scale: the difference in outside coordinates between consecutive values in the data vector. - inside and outside: these x-axis positions are mapped onto each other. For example, when you have a complicated probability distribution @@ -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: - inside_low and outside_low: these axis positions are mapped onto each other. - inside_high and outside_high: these axis positions are mapped onto each other. diff --git a/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWavelet.h b/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWavelet.h index 2311e8e0d38..a271a5f1a68 100644 --- a/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWavelet.h +++ b/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWavelet.h @@ -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); @@ -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_; @@ -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); @@ -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); diff --git a/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWaveletTransform.h b/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWaveletTransform.h index e355d1311d9..ff238d43e51 100644 --- a/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWaveletTransform.h +++ b/src/openms/include/OpenMS/TRANSFORMATIONS/FEATUREFINDER/IsotopeWaveletTransform.h @@ -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. */ diff --git a/src/pyOpenMS/pxds/ISpectrumAccess.pxd b/src/pyOpenMS/pxds/ISpectrumAccess.pxd index a7ab28ba5b1..058f7d8072a 100644 --- a/src/pyOpenMS/pxds/ISpectrumAccess.pxd +++ b/src/pyOpenMS/pxds/ISpectrumAccess.pxd @@ -18,12 +18,12 @@ cdef extern from "" namespace # virtual boost::shared_ptr lightClone() const = 0; - shared_ptr[OSSpectrum] getSpectrumById(int id_) nogil except + - libcpp_vector[size_t] getSpectraByRT(double RT, double deltaRT) nogil except + - size_t getNrSpectra() nogil except + + shared_ptr[OSSpectrum] getSpectrumById(int id_) nogil except + # wrap-doc:Return a pointer to a spectrum at the given string id + libcpp_vector[size_t] getSpectraByRT(double RT, double deltaRT) nogil except + # wrap-doc:Return a vector of ids of spectra that are within RT +/- deltaRT + size_t getNrSpectra() nogil except + # wrap-doc:Returns the number of spectra available # virtual SpectrumMeta getSpectrumMetaById(int id) const = 0; - shared_ptr[OSChromatogram] getChromatogramById(int id_) nogil except + - size_t getNrChromatograms() nogil except + + shared_ptr[OSChromatogram] getChromatogramById(int id_) nogil except + # wrap-doc:Return a pointer to a chromatogram at the given id + size_t getNrChromatograms() nogil except + # wrap-doc:Returns the number of chromatograms available libcpp_utf8_output_string getChromatogramNativeID(int id_) nogil except + diff --git a/src/pyOpenMS/pxds/IsotopeMarker.pxd b/src/pyOpenMS/pxds/IsotopeMarker.pxd index 379708fdcbf..ad91ae70415 100644 --- a/src/pyOpenMS/pxds/IsotopeMarker.pxd +++ b/src/pyOpenMS/pxds/IsotopeMarker.pxd @@ -10,8 +10,9 @@ cdef extern from "" namespace "Op cdef cppclass IsotopeMarker(PeakMarker) : # wrap-inherits: # PeakMarker - IsotopeMarker() nogil except + + IsotopeMarker() nogil except + # wrap-doc:IsotopeMarker marks peak pairs which could represent an ion and its isotope IsotopeMarker(IsotopeMarker &) nogil except + + void apply(libcpp_map[ double, bool ] & , MSSpectrum & ) nogil except + PeakMarker * create() nogil except + # wrap-ignore # TODO diff --git a/src/pyOpenMS/pxds/IsotopeModel.pxd b/src/pyOpenMS/pxds/IsotopeModel.pxd index 62deeaa5345..b79f243e105 100644 --- a/src/pyOpenMS/pxds/IsotopeModel.pxd +++ b/src/pyOpenMS/pxds/IsotopeModel.pxd @@ -5,17 +5,46 @@ from EmpiricalFormula cimport * cdef extern from "" namespace "OpenMS": cdef cppclass IsotopeModel "OpenMS::IsotopeModel": + # wrap-doc: + # Isotope distribution approximated using linear interpolation + # ----- + # This models a smoothed (widened) distribution, i.e. can be used to sample actual raw peaks (depending on the points you query) + # If you only want the distribution (no widening), use either + # EmpiricalFormula::getIsotopeDistribution() // for a certain sum formula + # or + # IsotopeDistribution::estimateFromPeptideWeight (double average_weight) // for averagine + # ----- + # Peak widening is achieved by either a Gaussian or Lorentzian shape + IsotopeModel() nogil except + IsotopeModel(IsotopeModel &) nogil except + UInt getCharge() nogil except + void setOffset(double offset) nogil except + - double getOffset() nogil except + - EmpiricalFormula getFormula() nogil except + - void setSamples(EmpiricalFormula &formula) nogil except + + # wrap-doc: + # Set the offset of the model + # ----- + # The whole model will be shifted to the new offset without being computing all over + # This leaves a discrepancy which is minor in small shifts (i.e. shifting by one or two + # standard deviations) but can get significant otherwise. In that case use setParameters() + # which enforces a recomputation of the model + + double getOffset() nogil except + # wrap-doc:Get the offset of the model + EmpiricalFormula getFormula() nogil except + # wrap-doc:Return the Averagine peptide formula (mass calculated from mean mass and charge -- use .setParameters() to set them) + void setSamples(EmpiricalFormula &formula) nogil except + # wrap-doc:Set sample/supporting points of interpolation double getCenter() nogil except + + # wrap-doc: + # Get the center of the Isotope model + # ----- + # This is a m/z-value not necessarily the monoisotopic mass + IsotopeDistribution getIsotopeDistribution() nogil except + + # wrap-doc: + # Get the Isotope distribution (without widening) from the last setSamples() call + # ----- + # Useful to determine the number of isotopes that the model contains and their position + # BaseModel[ 1 ] * create() nogil except + - String getProductName() nogil except + + String getProductName() nogil except + # wrap-doc:Name of the model (needed by Factory) cdef extern from "" namespace "OpenMS::IsotopeModel": cdef enum Averagines "OpenMS::IsotopeModel::Averagines": diff --git a/src/pyOpenMS/pxds/IsotopeWavelet.pxd b/src/pyOpenMS/pxds/IsotopeWavelet.pxd index 2d43742db5f..f2b94ccc4bf 100644 --- a/src/pyOpenMS/pxds/IsotopeWavelet.pxd +++ b/src/pyOpenMS/pxds/IsotopeWavelet.pxd @@ -12,22 +12,58 @@ cdef extern from "" names # IsotopeWavelet * init(double max_m, UInt max_charge) nogil except + # IsotopeWavelet * getInstance() nogil except + - void destroy() nogil except + + void destroy() nogil except + # wrap-doc:Deletes the singleton instance double getValueByMass(double t, double m, UInt z, Int mode) nogil except + + # wrap-doc: + # Returns the value of the isotope wavelet at position `t`. Usually, you do not need to call this function + # ----- + # 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 `z` we want to detect + # :param mode: Indicates whether positive mode (+1) or negative mode (-1) has been used for ionization + double getValueByLambda(double lambda_, double tz1) nogil except + + # wrap-doc: + # Returns the value of the isotope wavelet at position `t` via a fast table lookup + # ----- + # Usually, you do not need to call this function + # Please use `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 + double getValueByLambdaExtrapol(double lambda_, double tz1) nogil except + - double getValueByLambdaExact(double lambda_, double tz1) nogil except + - UInt getMaxCharge() nogil except + - void setMaxCharge(UInt max_charge) nogil except + - double getTableSteps() nogil except + - double getInvTableSteps() nogil except + - void setTableSteps(double table_steps) nogil except + - double getLambdaL(double m) nogil except + - # IsotopeDistribution::ContainerType getAveragine(double m, UInt *size) nogil except + - Size getGammaTableMaxIndex() nogil except + - Size getExpTableMaxIndex() nogil except + - float myPow(float a, float b) nogil except + - UInt getMzPeakCutOffAtMonoPos(double mass, UInt z) nogil except + - UInt getNumPeakCutOff(double mass, UInt z) nogil except + - UInt getNumPeakCutOff(double mz) nogil except + + # wrap-doc: + # Returns the value of the isotope wavelet at position `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 `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 + double getValueByLambdaExact(double lambda_, double tz1) nogil except +# TODO + UInt getMaxCharge() nogil except + # wrap-doc:Returns the largest charge state we will consider + void setMaxCharge(UInt max_charge) nogil except + # wrap-doc:Sets the `max_charge` parameter + double getTableSteps() nogil except + # wrap-doc:Returns the table_steps_ parameter + double getInvTableSteps() nogil except + # wrap-doc:Returns the inv_table_steps_ parameter + void setTableSteps(double table_steps) nogil except + # wrap-doc:Sets the `table_steps` parameter + double getLambdaL(double m) nogil except + # wrap-doc:Returns the mass-parameter lambda (linear fit) + # IsotopeDistribution::ContainerType getAveragine(double m, UInt *size) nogil except + + Size getGammaTableMaxIndex() nogil except + # wrap-doc:Returns the largest possible index for the pre-sampled gamma table + Size getExpTableMaxIndex() nogil except + # wrap-doc:Returns the largest possible index for the pre-sampled exp table + float myPow(float a, float b) nogil except + # wrap-doc:Internally used function; uses register shifts for fast computation of the power function + UInt getMzPeakCutOffAtMonoPos(double mass, UInt z) nogil except +# TODO + UInt getNumPeakCutOff(double mass, UInt z) nogil except +# TODO + UInt getNumPeakCutOff(double mz) nogil except +# TODO diff --git a/src/pyOpenMS/pxds/IsotopeWaveletTransform.pxd b/src/pyOpenMS/pxds/IsotopeWaveletTransform.pxd index 8b599ce2a82..1f34f135192 100644 --- a/src/pyOpenMS/pxds/IsotopeWaveletTransform.pxd +++ b/src/pyOpenMS/pxds/IsotopeWaveletTransform.pxd @@ -17,20 +17,80 @@ cdef extern from "" namespace "OpenMS": cdef cppclass ItraqConstants "OpenMS::ItraqConstants": + # wrap-doc: + # Some constants used throughout iTRAQ classes + # ----- + # Constants for iTRAQ experiments and a ChannelInfo structure to store information about a single channel + ItraqConstants() nogil except + # compiler ItraqConstants(ItraqConstants &) nogil except + # compiler @@ -24,7 +29,28 @@ cdef extern from "" namespace "Op # double ISOTOPECORRECTIONS_TMT_SIXPLEX() StringList getIsotopeMatrixAsStringList(int itraq_type, libcpp_vector[Matrix[double] ] & isotope_corrections) nogil except + + # wrap-doc: + # Convert isotope correction matrix to stringlist + # ----- + # Each line is converted into a string of the format channel:-2Da/-1Da/+1Da/+2Da ; e.g. '114:0/0.3/4/0' + # Useful for creating parameters or debug output + # ----- + # :param itraq_type: Which matrix to stringify. Should be of values from enum ITRAQ_TYPES + # :param isotope_corrections: Vector of the two matrices (4plex, 8plex) + void updateIsotopeMatrixFromStringList(int itraq_type, StringList & channels, libcpp_vector[Matrix[double] ] & isotope_corrections) nogil except + + # wrap-doc: + # Convert strings to isotope correction matrix rows + # ----- + # Each string of format channel:-2Da/-1Da/+1Da/+2Da ; e.g. '114:0/0.3/4/0' + # is parsed and the corresponding channel(row) in the matrix is updated + # Not all channels need to be present, missing channels will be left untouched + # Useful to update the matrix with user isotope correction values + # ----- + # :param itraq_type: Which matrix to stringify. Should be of values from enum ITRAQ_TYPES + # :param channels: New channel isotope values as strings + # :param isotope_corrections: Vector of the two matrices (4plex, 8plex) + # void initChannelMap(int itraq_type, ChannelMapType & map_) nogil except + # void updateChannelMap(StringList & active_channels, ChannelMapType & map_) nogil except + Matrix[ double ] translateIsotopeMatrix(int & itraq_type, libcpp_vector[Matrix[double] ] & isotope_corrections) nogil except + diff --git a/src/pyOpenMS/pxds/ItraqEightPlexQuantitationMethod.pxd b/src/pyOpenMS/pxds/ItraqEightPlexQuantitationMethod.pxd index 3fb1bd12295..fa153be4dba 100644 --- a/src/pyOpenMS/pxds/ItraqEightPlexQuantitationMethod.pxd +++ b/src/pyOpenMS/pxds/ItraqEightPlexQuantitationMethod.pxd @@ -6,6 +6,7 @@ cdef extern from "" namespace "OpenMS": cdef cppclass JavaInfo: - JavaInfo() nogil except + + JavaInfo() nogil except + # wrap-doc:Detect Java and retrieve information JavaInfo(JavaInfo &) nogil except + bool canRun(String java_executable) nogil except + + # wrap-doc: + # Determine if Java is installed and reachable + # ----- + # The call fails if either Java is not installed or if a relative location is given and Java is not on the search PATH + # ----- + # :param java_executable: Path to Java executable. Can be absolute, relative or just a filename + # :returns: Returns false if Java executable can not be called; true if Java executable can be executed diff --git a/src/pyOpenMS/pxds/KDTreeFeatureMaps.pxd b/src/pyOpenMS/pxds/KDTreeFeatureMaps.pxd index 7b0ca77be2b..b4b6ae00f2b 100644 --- a/src/pyOpenMS/pxds/KDTreeFeatureMaps.pxd +++ b/src/pyOpenMS/pxds/KDTreeFeatureMaps.pxd @@ -16,10 +16,10 @@ cdef extern from "" namespace cdef cppclass KDTreeFeatureMaps(DefaultParamHandler) : # wrap-inherits: # DefaultParamHandler - KDTreeFeatureMaps() nogil except + + KDTreeFeatureMaps() nogil except + # wrap-doc:Stores a set of features, together with a 2D tree for fast search KDTreeFeatureMaps(libcpp_vector[ FeatureMap ] & maps, Param & param) nogil except + KDTreeFeatureMaps(libcpp_vector[ ConsensusMap ] & maps, Param & param) nogil except + - void addMaps(libcpp_vector[ FeatureMap ] & maps) nogil except + + void addMaps(libcpp_vector[ FeatureMap ] & maps) nogil except + # wrap-doc:Add `maps` and balance kd-tree void addMaps(libcpp_vector[ ConsensusMap ] & maps) nogil except + # POINTER # void addFeature(Size mt_map_index, BaseFeature * feature) nogil except + # POINTER # BaseFeature * feature(Size i) nogil except + @@ -39,7 +39,7 @@ cdef extern from "" namespace double mz_tol, bool mz_ppm, bool include_features_from_same_map, - double max_pairwise_log_fc) nogil except + + double max_pairwise_log_fc) nogil except + # wrap-doc:Fill `result` with indices of all features compatible (wrt. RT, m/z, map index) to the feature with `index` void queryRegion(double rt_low, double rt_high, double mz_low, double mz_high, libcpp_vector[ size_t ] & result_indices, Size ignored_map_index) nogil except + # void applyTransformations(libcpp_vector[ TransformationModelLowess * ] & trafos) nogil except + diff --git a/src/pyOpenMS/pxds/KroenikFile.pxd b/src/pyOpenMS/pxds/KroenikFile.pxd index 4bae8d94c5e..966552bbc8d 100644 --- a/src/pyOpenMS/pxds/KroenikFile.pxd +++ b/src/pyOpenMS/pxds/KroenikFile.pxd @@ -8,8 +8,29 @@ from Feature cimport * cdef extern from "" namespace "OpenMS": cdef cppclass KroenikFile: + # wrap-doc: + # File adapter for Kroenik (HardKloer sibling) files + # ----- + # The first line is the header and contains the column names: + # File, First Scan, Last Scan, Num of Scans, Charge, Monoisotopic Mass, Base Isotope Peak, Best Intensity, Summed Intensity, First RTime, Last RTime, Best RTime, Best Correlation, Modifications + # ----- + # Every subsequent line is a feature + # ----- + # All properties in the file are converted to Feature properties, whereas "First Scan", "Last Scan", "Num of Scans" and "Modifications" are stored as + # metavalues with the following names "FirstScan", "LastScan", "NumOfScans" and "AveragineModifications" + # ----- + # The width in m/z of the overall convex hull of each feature is set to 3 Th in lack of a value provided by the Kroenik file KroenikFile() nogil except + - void store(String filename, MSSpectrum & spectrum) nogil except + + void store(String filename, MSSpectrum & spectrum) nogil except + # wrap-doc:Stores a MSExperiment into a Kroenik file void load(String filename, FeatureMap & feature_map) nogil except + + # wrap-doc: + # Loads a Kroenik file into a featureXML + # ----- + # The content of the file is stored in `features` + # ----- + # :raises: + # Exception: FileNotFound is thrown if the file could not be opened + # :raises: + # Exception: ParseError is thrown if an error occurs during parsing diff --git a/src/pyOpenMS/pxds/LabeledPairFinder.pxd b/src/pyOpenMS/pxds/LabeledPairFinder.pxd index 1c5f3c39f7f..2e4f19aa6d8 100644 --- a/src/pyOpenMS/pxds/LabeledPairFinder.pxd +++ b/src/pyOpenMS/pxds/LabeledPairFinder.pxd @@ -5,11 +5,16 @@ from BaseGroupFinder cimport * cdef extern from "" namespace "OpenMS": cdef cppclass LabeledPairFinder(BaseGroupFinder) : + # wrap-doc: + # The LabeledPairFinder allows the matching of labeled features (features with a fixed distance) + # ----- + # Finds feature pairs that have a defined distance in RT and m/z in the same map + # wrap-inherits: # BaseGroupFinder LabeledPairFinder() nogil except + # private LabeledPairFinder(LabeledPairFinder &) nogil except + # wrap-ignore - void run(libcpp_vector[ ConsensusMap ] & input_maps, ConsensusMap & result_map) nogil except + + void run(libcpp_vector[ ConsensusMap ] & input_maps, ConsensusMap & result_map) nogil except + # wrap-doc:Run the LabeledPairFinder algorithm # POINTER # BaseGroupFinder * create() nogil except + - String getProductName() nogil except + + String getProductName() nogil except + # wrap-doc:Returns the name of this module diff --git a/src/pyOpenMS/pxds/LevMarqFitter1D.pxd b/src/pyOpenMS/pxds/LevMarqFitter1D.pxd index 2ff73e9fa37..7dcb59f6e4a 100644 --- a/src/pyOpenMS/pxds/LevMarqFitter1D.pxd +++ b/src/pyOpenMS/pxds/LevMarqFitter1D.pxd @@ -5,5 +5,5 @@ cdef extern from "" name cdef cppclass LevMarqFitter1D(Fitter1D): # wrap-ignore # no-pxd-import - LevMarqFitter1D() nogil except + + LevMarqFitter1D() nogil except + # wrap-doc:Abstract class for 1D-model fitter using Levenberg-Marquardt algorithm for parameter optimization LevMarqFitter1D(LevMarqFitter1D &) nogil except + diff --git a/src/pyOpenMS/pxds/LibSVMEncoder.pxd b/src/pyOpenMS/pxds/LibSVMEncoder.pxd index 9ca3da915d1..e62916eedcb 100644 --- a/src/pyOpenMS/pxds/LibSVMEncoder.pxd +++ b/src/pyOpenMS/pxds/LibSVMEncoder.pxd @@ -6,6 +6,13 @@ from SVMWrapper cimport * cdef extern from "" namespace "OpenMS": cdef cppclass LibSVMEncoder "OpenMS::LibSVMEncoder": + # wrap-doc: + # Serves for encoding sequences into feature vectors + # ----- + # The class can be used to construct composition vectors for + # sequences. Additionally the vectors can be encoded into + # the libsvm format + LibSVMEncoder() nogil except + LibSVMEncoder(LibSVMEncoder &) nogil except + # compiler diff --git a/src/pyOpenMS/pxds/LinearInterpolation.pxd b/src/pyOpenMS/pxds/LinearInterpolation.pxd index 84d906674db..fc495f17b98 100644 --- a/src/pyOpenMS/pxds/LinearInterpolation.pxd +++ b/src/pyOpenMS/pxds/LinearInterpolation.pxd @@ -5,28 +5,48 @@ from Types cimport * cdef extern from "" namespace "OpenMS::Math": cdef cppclass LinearInterpolation[KeyType,ValueType]: + # wrap-doc: + # Provides access to linearly interpolated values (and + # derivatives) from discrete data points. Values beyond the given range + # of data points are implicitly taken as zero. + # ----- + # The input is just a vector of values ("Data"). These are interpreted + # as the y-coordinates at the x-coordinate positions 0,...,data_.size-1. + # ----- + # The interpolated data can also be scaled and shifted in + # the x-dimension by an affine mapping. That is, we have "inside" and + # "outside" x-coordinates. The affine mapping can be specified in two + # ways: + # - using setScale() and setOffset(), + # - using setMapping() + # ----- + # By default the identity mapping (scale=1, offset=0) is used. + # ----- + # Using the value() and derivative() methods you can sample linearly + # interpolated values for a given x-coordinate position of the data and + # the derivative of the data. + # wrap-instances: # LinearInterpolation := LinearInterpolation[double, double] LinearInterpolation() nogil except + LinearInterpolation(LinearInterpolation &) nogil except + - ValueType value(KeyType arg_pos) nogil except + - void addValue(KeyType arg_pos, ValueType arg_value) nogil except + - ValueType derivative(KeyType arg_pos) nogil except + + ValueType value(KeyType arg_pos) nogil except + # wrap-doc:Returns the interpolated value + void addValue(KeyType arg_pos, ValueType arg_value) nogil except + # wrap-doc:Performs linear resampling. The `arg_value` is split up and added to the data points around `arg_pos` + ValueType derivative(KeyType arg_pos) nogil except + # wrap-doc:Returns the interpolated derivative - libcpp_vector[ValueType] getData() nogil except + - void setData(libcpp_vector[ValueType] & data) nogil except + - bool empty() nogil except + - KeyType key2index(KeyType pos) nogil except + - KeyType index2key(KeyType pos) nogil except + - KeyType getScale() nogil except + - void setScale(KeyType & scale) nogil except + - KeyType getOffset() nogil except + - void setOffset(KeyType & offset) nogil except + - void setMapping(KeyType & scale, KeyType & inside, KeyType & outside) nogil except + - void setMapping(KeyType & inside_low, KeyType & outside_low, KeyType & inside_high, KeyType & outside_high) nogil except + - KeyType getInsideReferencePoint() nogil except + + libcpp_vector[ValueType] getData() nogil except + # wrap-doc:Returns the internal random access container from which interpolated values are being sampled + void setData(libcpp_vector[ValueType] & data) nogil except + # wrap-doc:Assigns data to the internal random access container from which interpolated values are being sampled + bool empty() nogil except + # wrap-doc:Returns `true` if getData() is empty + KeyType key2index(KeyType pos) nogil except + # wrap-doc:The transformation from "outside" to "inside" coordinates + KeyType index2key(KeyType pos) nogil except + # wrap-doc:The transformation from "inside" to "outside" coordinates + KeyType getScale() nogil except + # wrap-doc:"Scale" is the difference (in "outside" units) between consecutive entries in "Data" + void setScale(KeyType & scale) nogil except + # wrap-doc:"Scale" is the difference (in "outside" units) between consecutive entries in "Data" + KeyType getOffset() nogil except + # wrap-doc:"Offset" is the point (in "outside" units) which corresponds to "Data[0]" + void setOffset(KeyType & offset) nogil except + # wrap-doc:"Offset" is the point (in "outside" units) which corresponds to "Data[0]" + void setMapping(KeyType & scale, KeyType & inside, KeyType & outside) nogil except +# TODO + void setMapping(KeyType & inside_low, KeyType & outside_low, KeyType & inside_high, KeyType & outside_high) nogil except +# TODO + KeyType getInsideReferencePoint() nogil except + KeyType getOutsideReferencePoint() nogil except + KeyType supportMin() nogil except + KeyType supportMax() nogil except + LinearInterpolation(KeyType scale, KeyType offset) nogil except + - diff --git a/src/pyOpenMS/pxds/LinearResampler.pxd b/src/pyOpenMS/pxds/LinearResampler.pxd index 27f8a4b201a..78ef4e61ec5 100644 --- a/src/pyOpenMS/pxds/LinearResampler.pxd +++ b/src/pyOpenMS/pxds/LinearResampler.pxd @@ -15,6 +15,5 @@ cdef extern from "" namespace " LinearResampler() nogil except + LinearResampler(LinearResampler &) nogil except + # compiler - void raster(MSSpectrum & input) nogil except + - void rasterExperiment(MSExperiment & input) nogil except + - + void raster(MSSpectrum & input) nogil except + # wrap-doc:Applies the resampling algorithm to an MSSpectrum + void rasterExperiment(MSExperiment & input) nogil except + # wrap-doc:Resamples the data in an MSExperiment diff --git a/src/pyOpenMS/pxds/LocalLinearMap.pxd b/src/pyOpenMS/pxds/LocalLinearMap.pxd index 53b6dc6206f..ef9872c8be8 100644 --- a/src/pyOpenMS/pxds/LocalLinearMap.pxd +++ b/src/pyOpenMS/pxds/LocalLinearMap.pxd @@ -5,16 +5,31 @@ from Matrix cimport * cdef extern from "" namespace "OpenMS": cdef cppclass LocalLinearMap "OpenMS::LocalLinearMap": + # wrap-doc: + # Trained Local Linear Map (LLM) model for peak intensity prediction + # ----- + # This class offers a model for predictions of peptide peak heights + # (referred to as intensities) by a Local Linear Map (LLM) model and + # is the basis of PeakIntensityPredictor + # ----- + # A general introduction to the Peak Intensity Predictor (PIP) + # can be found in the PIP Tutorial + # ----- + # The model trained needs two files for storing the position of the + # codebook vectors and the linear mappings (codebooks.data, linearMapping.data) + # This is the default model used by PeakIntensityPredictor + LocalLinearMap() nogil except + # private LocalLinearMap(LocalLinearMap &) nogil except + # wrap-ignore - LLMParam getLLMParam() nogil except + - Matrix[ double ] getCodebooks() nogil except + - Matrix[ double ] getMatrixA() nogil except + - libcpp_vector[ double ] getVectorWout() nogil except + + LLMParam getLLMParam() nogil except + # wrap-doc:Return parameters of the LocalLinearMap model + Matrix[ double ] getCodebooks() nogil except + # wrap-doc:Return position of the codebook vectors (18-dim) + Matrix[ double ] getMatrixA() nogil except + # wrap-doc:Return linear mappings of the codebooks + libcpp_vector[ double ] getVectorWout() nogil except + # wrap-doc:Return linear bias + # TODO STL attributes unsigned int # Matrix[ UInt ] getCord() nogil except + - void normalizeVector(libcpp_vector[ double ] & aaIndexVariables) nogil except + + void normalizeVector(libcpp_vector[ double ] & aaIndexVariables) nogil except + # wrap-doc:Calculate and return normalized amino acid index variables from string representation of peptide # libcpp_vector[ double ] neigh(Matrix[ unsigned int ] & cord, Size win, double radius) nogil except + @@ -26,4 +41,3 @@ cdef extern from "" namespace "OpenMS::Loc UInt xdim UInt ydim double radius -