Is it possible to create a script in MassHunter Qualitative Analysis 10.0 for automatic formula selection?

I am working with the MassHunter Qualitative Analysis 10.0 software and have a question about automating a process. The file QualActionScriptPartialMaster.cs in the Scripts folder includes the following code:

CmdChangeFormulaSelection(int dataItemId, int mzRowId, int formulaRowId)

I would like to know if it is possible to use this code to create a script that, after running an Identification Workflow, automatically selects the formula with the best score.

Has anyone worked on something similar or could provide guidance on how to implement this script? I would greatly appreciate any help or recommendations.

Best regards,

  • Hello  ,

    The identification workflows by default should select the formula with the best score, based on method settings. I'm not aware of much documentation regarding qual scripting. 

    What is the issue you are encountering, or what are you trying to do?

  • Hi Howard,

    Thank you for your response.

    In MH Qual 10.0, my usual workflow for analyzing LC-QTOF data involves performing a targeted analysis using the Find by Formula option with a .cdb library, followed by compound identification using the Identification Workflow option.

    The issue I’m encountering is that, after running the Identification Workflow, the compound with the best score is not automatically selected. Instead, I have to manually select it, which can be time-consuming.

    I’m looking for a way to automate this process so that the compound with the highest score is automatically selected. Do you have any suggestions or insights on how this can be achieved?

    I appreciate your help and guidance.

    Best regards,
    ACJT

  • Hello  ,

    This may not be an intended workflow, so that might explain the behavior you are seeing. Find by formula will only look for compounds in your database. It extracts EICs for all of the compounds and if a chromatographic peak is found that meets the criteria set by your method then that compound will be shown as found and given a score. If you then follow this by manually running the Identification Workflow, this will re-search the found compounds against whatever database you specify in that part of the method. If there is a better hit this will not be chosen. I believe this is because the original workflow was targeted and now you are running an untargeted workflow, and the two different scoring results cannot be combined by MassHunter.

    If possible, you could use the database from your Identification Workflow to perform your find by formula. Otherwise, you could try using another find by algorithm, such as MFE, and then follow that with the database search.  

Was this helpful?