Skip to content
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

Conversation

Sonja-analytik
Copy link
Contributor

with "refineAnnotationsByIsotopesDifferentResolutions" 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

…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
@@ -208,6 +320,35 @@ private static IsotopePattern getCalculateIsotopePattern(final MZTolerance mzTol
return pattern;
}

private static Map<Double, IsotopePattern> getCalculateIsotopePatternDifferentResolutions(
Copy link
Member

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,
Copy link
Member

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?

// no isotope pattern and no default MS1 scan. e.g., if just a feature list loaded
return false;
}
var score = calculateIsotopeScoreDifferentResolutions(annotation, measuredIsotopes, minIntensity,
Copy link
Member

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};
Copy link
Member

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 ...

Copy link
Member

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

Sonja-analytik and others added 3 commits October 16, 2023 14:52
…otope_pattern_matcher

# Conflicts:
#	src/main/java/io/github/mzmine/modules/dataprocessing/id_localcsvsearch/LocalCSVDatabaseSearchTask.java
@robinschmid
Copy link
Member

looks good to me

@robinschmid robinschmid merged commit 7412d9f into mzmine:master Jan 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants