Open
Conversation
Add hotfix DIMS/v3.3.1 to main
Jorisvansteenbrugge
requested changes
Mar 6, 2026
Comment on lines
+13
to
+14
| trim_left_pos <- round(pos_times[length(pos_times) * (trim * 1.5)]) | ||
| trim_right_pos <- round(pos_times[length(pos_times) * (1 - (trim * 0.5))]) |
There was a problem hiding this comment.
I am a bit confused what trim is exactly?
Why is trim a parameter, but the 1.5 and 0.5 are hard coded. I would make all of them function parameters (with a default value)
Comment on lines
+5
to
+6
| #' @param scantimes: vector of scan times in seconds | ||
| #' @param polarities: vector of polarities (positive or negative) |
There was a problem hiding this comment.
I am missing a description of the trim param
|
|
||
| # trim (remove) scans at the start and end (10%) for negative | ||
| trim_left_neg <- round(neg_times[length(neg_times) * trim]) | ||
| trim_right_neg <- round(neg_times[length(neg_times) * (1 - trim)]) |
| #' @param mzrange: vector of minimum and maximum m/z values (integeers) | ||
| #' @param resol: value for resolution (integer) | ||
|
|
||
| # initialize |
There was a problem hiding this comment.
Suggested change
| # initialize |
There was a problem hiding this comment.
in get_breaks_for_bins() you have as a comment fwhm (width of peaks) is assumed to be constant within a segment.
Would it make sense to add a test to see what happens if that is not the case?
| script: | ||
| """ | ||
| Rscript ${baseDir}/CustomModules/DIMS/GenerateBreaks.R $mzML_file ./ $params.trim $params.resolution | ||
| Rscript ${baseDir}/CustomModules/DIMS/GenerateBreaks.R $mzML_file $params.trim $params.resolution |
There was a problem hiding this comment.
Please refrain from referencing params and baseDir in the script block.
See #94 (comment) and #94 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code refactored, moved into functions. Output for trim_parameters and breaks separated. This has implications for other steps in the pipeline, but this has already been set up in refactor_PeakFinding (which is not in develop yet).
Unit tests added.