Repository navigation
[REFACTOR] move FFid to algorithm - #3293
Conversation
|
looks good - of course it is now missing a test :-) |
|
Yes, I know ;). Don't know which policy we should have.
Maybe something we could discuss at the developer meeting. |
|
👍 if @hendrikweisser agrees |
791592e to
99ce5fb
Compare
|
@hendrikweisser I added a test stub. Do you have some test code available? Otherwise, I would leave it as is (tested via TOPP tool test). |
|
Sorry, I haven't had time to look at this yet. I'll try to do it later today or tomorrow. Regarding tests, I would say leave it as it is for now and open a ticket for missing FFId class tests. |
hendrikweisser
left a comment
There was a problem hiding this comment.
Thanks for doing this thankless job, Timo. ;-)
I've left some comments. In general:
- Can you configure your editor to not put spaces before "&"/"*" in references/pointers, please?
Type constalways looks weird to me, especially when mixed with the (standard)const Type.- There may be more includes that can now be removed in the TOPP tool implementation.
- In the header file, format comments so they can be picked up by Doxygen (where appropriate).
| std::vector<ProteinIdentification> proteins, | ||
| std::vector<PeptideIdentification> peptides_ext, | ||
| std::vector<ProteinIdentification> proteins_ext, | ||
| FeatureMap & features |
There was a problem hiding this comment.
No space before "&".
There was a problem hiding this comment.
Actually, it is not my editor (vim) that does that but me ;)
That way, I find it much easier to spot if references are passed.
I have seen "Type const" being used more often recently and I think newer
compiler sometimes complain about using: "const auto &" instead of "auto const &".
I don't care too much about these two style issues and would in principle be willing to adopt whatever you like. But I would like to make these style questions more of a community decision.
Most important thing is to be consistent than to decide for A or B,
There was a problem hiding this comment.
We had the discussion about spaces around "*" and "&" before. It is still in our Coding Conventions (https://github.com/OpenMS/OpenMS/wiki/Coding-conventions), although not all the examples on that page are consistent with it:
If function arguments are pointers or references, the pointer or reference qualifier is appended to the variable type. It should not prefix the variable name.
The problem with spaces on both sides is that it makes it look like a mathematical operator (more of an issue for "*").
The vast majority of the code in OpenMS uses "const Type", so absent a good reason to the contrary, we should stick to that - as you said, consistency is most important.
| FeatureMap & features | ||
| ); | ||
|
|
||
| void runOnCandidates(FeatureMap & features); |
There was a problem hiding this comment.
No space before "&".
| typedef FeatureFinderAlgorithmPickedHelperStructs::MassTrace MassTrace; | ||
| typedef FeatureFinderAlgorithmPickedHelperStructs::MassTraces MassTraces; | ||
|
|
||
| // mapping: RT (not necessarily unique) -> pointer to peptide |
There was a problem hiding this comment.
Use "///" here so Doxygen picks up those comments? (Also below.)
| const PeakMap& getChromatograms() const { return chrom_data_; } | ||
|
|
||
| ProgressLogger& getProgressLogger() { return prog_log_; } | ||
| ProgressLogger const & getProgressLogger() const { return prog_log_; } |
There was a problem hiding this comment.
const ProgressLogger& ...
| } | ||
|
|
||
| void FeatureFinderIdentificationAlgorithm::postProcess_( | ||
| FeatureMap & features, |
There was a problem hiding this comment.
No space before "&".
| // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| // | ||
| // -------------------------------------------------------------------------- | ||
| // $Maintainer: $ |
There was a problem hiding this comment.
Maintainer/author missing.
| FeatureFinderIdentificationAlgorithm* null_ptr = 0; | ||
| START_SECTION(FeatureFinderIdentificationAlgorithm()) | ||
| { | ||
| ptr = new FeatureFinderIdentificationAlgorithm(); |
There was a problem hiding this comment.
Use standard amount of identation (two spaces).
| #include <OpenMS/ANALYSIS/TARGETED/TargetedExperiment.h> | ||
| #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/FeatureFinderIdentificationAlgorithm.h> | ||
|
|
||
| #include <OpenMS/CHEMISTRY/IsotopeDistribution.h> |
There was a problem hiding this comment.
Can this be removed here?
| #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/EGHTraceFitter.h> | ||
| #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/GaussTraceFitter.h> | ||
|
|
||
| #include <boost/shared_ptr.hpp> |
There was a problem hiding this comment.
Can the two Boost includes be removed here?
| @@ -39,19 +39,15 @@ | |||
| #include <OpenMS/ANALYSIS/OPENSWATH/ChromatogramExtractor.h> | |||
There was a problem hiding this comment.
Can these OpenSWATH includes be removed here?
|
thanks for the review. I will address the issues you brought up. |
|
failed test unrelated |
Factored out FFid to an algorithm.