Result Export
After molecular formula annotation, you can access the result summary as demonstrated in the Quick Start session.
All the top 5 formulas will be included in the results.
# retrieve the annotation result summary
results = msb_engine.get_summary()
In case you want to access all the annotation results, you can iterate through the CandidateFormula objects stored in each MetaFeature.
# retrieve all the annotation results for each metabolic feature
for meta_feature in msb_engine.data:
for i, candidate in enumerate(meta_feature.candidate_formula_list):
print('MetaFeature mz' + str(meta_feature.mz) + ' rt: ' + str(meta_feature.rt) + \
' rank: ' + str(i+1) + 'Formula: ' + candidate.formula.__str__() + \
' estimated FDR: ' + str(candidate.estimated_fdr))
Please see MetaFeature and CandidateFormula in Python API for more details.
Note
If you are using the command-line interface, the result summary will be automatically written in the output directory as a .tsv file.
To access more detailed annotation results, you can use the -details option. See Command-line API for more details.