-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extension of the DatabaseIsotopeRefiner #1507
extension of the DatabaseIsotopeRefiner #1507
Conversation
…opesDifferentResolutions" based on the IsotopePatternFinder: - Calculation of isotope patterns at different resolutions - comparison of these with the found isotope pattern - highest isotope pattern score is output
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
@@ -208,6 +320,35 @@ private static IsotopePattern getCalculateIsotopePattern(final MZTolerance mzTol | |||
return pattern; | |||
} | |||
|
|||
private static Map<Double, IsotopePattern> getCalculateIsotopePatternDifferentResolutions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the get from the name
final double minIntensity, final IonType adductType, final IMolecularFormula ionFormula) { | ||
// TODO Predict pattern - Do this in the IsotopePatternCalculator.calculateIsotopePatternForResolutions | ||
// return Map<Integer, IsotopePattern> (use HashMap<>) | ||
var patterns = IsotopePatternCalculator.calculateIsotopePatternForResolutions(ionFormula, minIntensity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you just call this method, why even wrap it in another method?
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/mzmine/modules/tools/isotopeprediction/IsotopePatternCalculator.java
Show resolved
Hide resolved
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
// no isotope pattern and no default MS1 scan. e.g., if just a feature list loaded | ||
return false; | ||
} | ||
var score = calculateIsotopeScoreDifferentResolutions(annotation, measuredIsotopes, minIntensity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should save this score somehow in the final annotation so that we can reuse it?
return finalScore; | ||
} | ||
private static double[] getDoubleResolutions(){ | ||
return new double[]{0.0001,0.001,0.01,0.1}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can finalize those later but maybe the smallest shoudl be something like 0.00025 or a bit higher?
would be interesting to know what you need to separate N O C S ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment below. Maybe just creating a global MZtolerance[] might be best
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
.../github/mzmine/modules/dataprocessing/id_localcsvsearch/DatabaseIsotopeRefinerScanBased.java
Outdated
Show resolved
Hide resolved
…otope_pattern_matcher # Conflicts: # src/main/java/io/github/mzmine/modules/dataprocessing/id_localcsvsearch/LocalCSVDatabaseSearchTask.java
looks good to me |
with "refineAnnotationsByIsotopesDifferentResolutions" based on the IsotopePatternFinder: