Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
992335a
added myself as author
Mar 24, 2023
f58ff8c
Merge branch 'OpenMS:develop' into develop
Austernpilz Mar 25, 2023
4301756
Merge branch 'OpenMS:develop' into develop
Austernpilz May 4, 2023
b5c8773
wip
May 17, 2023
d601583
Histogramme sind sexy
May 17, 2023
2c300bc
wip
May 17, 2023
fb52800
wip
May 17, 2023
b3d7248
histogramm der Chromapices
May 17, 2023
e88e9fa
final histo
May 17, 2023
d762f07
final final histogramm cumulativ
May 19, 2023
fad1cd5
final final histogramm cumulativ
May 19, 2023
98c645e
; wip
May 19, 2023
6cc57f1
checking for modularization and making notes
May 19, 2023
736c5df
update Apex
May 19, 2023
c736dcd
update Apex, with safes
May 19, 2023
1896553
getting rid of spaghetti, while thinking about parallelization
May 19, 2023
61226eb
unfinished changes
May 21, 2023
b5c9cf7
wip
May 21, 2023
4fab3a3
class NextIndex implemented
May 22, 2023
8f3cb47
wip but slow
May 22, 2023
65550d0
tristan go, manuel mittagsschlag
May 22, 2023
130c234
ziemlich langer mittagsschlaf ....
May 25, 2023
fcf83b0
testing == waiting
May 25, 2023
9ef3fb9
mittagspause
May 25, 2023
e270b5c
tests pass, workflow not, nap was goodood
May 25, 2023
5193180
daten fertig ausgesucht, nur noch test anpassen und groesse checken, …
May 25, 2023
0502e41
one last push
May 25, 2023
242a783
morning meetings make me sleepy
May 26, 2023
2bc9aab
ist das jetzt proof through work or proof through result
May 26, 2023
67ad0f2
wip
May 26, 2023
d656a22
so nur noch aufraeumen i guess
May 27, 2023
7ccee13
last changes
May 27, 2023
c54a80b
tests fertig and functioning
May 27, 2023
40cb514
tests fixed and fixed for parallelization
May 30, 2023
9b9d2ef
fixup
May 30, 2023
1141509
fixup
May 30, 2023
4c43a74
tristans clean and comment
May 31, 2023
acb419a
Merge branch 'develop' into pmsb_23_MassTraceDetection
Austernpilz May 31, 2023
ac42ce1
tristan latest changes
Jun 1, 2023
8970055
merge to push
Jul 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ the authors tag in the respective file header.
- Marc Sturm
- Markus Mueller
- Martin Langwisch
- Manuel Zschäbitz
- Mateusz Łącki
- Mathias Walzer
- Matthew The
Expand Down Expand Up @@ -102,6 +103,7 @@ the authors tag in the respective file header.
- Till Englert
- Tom Lukas Lankenau
- Tom Waschischeck
- Tristan Aretz
- Uwe Schmitt
- Valentin Noske
- Vincent Musch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
//
// --------------------------------------------------------------------------
// $Maintainer: Timo Sachsenberg $
// $Authors: Erhan Kenar, Holger Franken $
// $Authors: Erhan Kenar, Holger Franken, Tristan Aretz, Manuel Zschaebitz $
// --------------------------------------------------------------------------

#pragma once

#include <boost/dynamic_bitset.hpp>
#include <OpenMS/CONCEPT/ProgressLogger.h>
#include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
#include <OpenMS/KERNEL/MassTrace.h>
Expand Down Expand Up @@ -84,7 +85,12 @@ namespace OpenMS
*/

/// Allows the iterative computation of the intensity-weighted mean of a mass trace's centroid m/z.
void updateIterativeWeightedMeanMZ(const double &, const double &, double &, double &, double &);
void updateIterativeWeightedMeanMZ(const double added_mz,
const double added_int,
double& centroid_mz,
double& prev_counter,
double& prev_denom
);

/** @name Main computation methods
*/
Expand All @@ -97,27 +103,82 @@ namespace OpenMS

/** @name Private methods and members
*/


protected:
void updateMembers_() override;

private:

struct Apex
{
Apex(double intensity, Size scan_idx, Size peak_idx);
double intensity;
Size scan_idx;
Size peak_idx;
Apex(PeakMap& map, const Size scan_idx, const Size peak_idx);
// Default constructors
Apex() = default;
Apex(const Apex& other) = default;
Apex(Apex&& other) = default;

// Move assignment operator
Apex& operator=(Apex&& other) = default;

std::reference_wrapper<PeakMap> map_;
Size scan_idx_;
Size peak_idx_;

///get's the corresponding values
double getMZ() const;
double getRT() const;
double getIntensity() const;
};

struct NextIndex
{
/// C'tor: init with number of threads in parallel region
NextIndex(const std::vector<Apex>& data, const Size total_peak_count, const std::vector<Size>& spec_offsets, const double mass_error_ppm);

/// Get the next free apex index which is not in the neighbourhood of a currently processing apex (in another thread)
/// (Internally adds the apex's m/z to a blacklist which prevents other threads from obtaining an apex nearby)
/// This function blocks until the next free apex is not conflicting anymore - i.e. another thread called setApexAsProcessed()
Size getNextFreeIndex();

/// If an apex was processed call this function to remove the apex from the blacklist and increase the current_apex_
/// ... doesn't create a feature
void setApexAsProcessed();
/// ... does create a feature
void setApexAsProcessed(const std::vector<std::pair<Size, Size> >& gathered_idx);

bool isConflictingApex(const Apex a) const;

bool isVisited(const Size scan_idx, const Size peak_idx) const;

void setNumberOfThreads(const Size thread_num);


/// reference for usage
const std::vector<Apex>& data_;
const std::vector<Size>& spec_offsets_;

/// own datastructure
std::vector<bool> peak_visited_;
Size current_Apex_;
std::vector<double> lock_list_;
double mass_error_ppm_;
};

/// internal check for FWHM meta data
bool checkFWHMMetaData_(const PeakMap& work_exp);

/// The internal run method
void run_(const std::vector<Apex>& chrom_apices,
void run_(std::vector<Apex>& chrom_apices,
const Size peak_count,
const PeakMap & work_exp,
const std::vector<Size>& spec_offsets,
std::vector<MassTrace> & found_masstraces,
const Size max_traces = 0);

// Find Offset for Peak
static double findOffset_(const double centroid_mz, const double mass_error_ppm_);

// parameter stuff
double mass_error_ppm_;
double mass_error_da_;
Expand All @@ -133,4 +194,4 @@ namespace OpenMS

bool reestimate_mt_sd_;
};
}
}
9 changes: 9 additions & 0 deletions src/openms/include/OpenMS/KERNEL/MassTrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ namespace OpenMS
/// Detailed constructor for vector
MassTrace(const std::vector<PeakType>& trace_peaks);

/// Constructor for typr T with move iterator
template <typename InputIterator>
MassTrace(InputIterator begin, InputIterator end) :
trace_peaks_(std::make_move_iterator(begin), std::make_move_iterator(end)),
label_(),
smoothed_intensities_()
{
}

/// Destructor
~MassTrace() = default;

Expand Down
Loading