metaspace2020 / metaspace

Cloud engine and platform for metabolite annotation for imaging mass spectrometry
https://metaspace2020.eu/
Apache License 2.0
47 stars 10 forks source link

Fix FDR formula #1477

Open Bisho2122 opened 8 months ago

Bisho2122 commented 8 months ago

Based on the current formulation of the FDR, datasets having high decoy scores can lead to FDR values > 1 leading to loss of some annotations when preparing results by applying a cutoff of FDR < 1 (https://github.com/metaspace2020/metaspace/blob/6661211be8c87c2ff617f2cb8716a128bdc3915d/metaspace/engine/sm/engine/annotation_lithops/prepare_results.py#L74).

This fixes the FDR calculation by adding the weighted decoy term to the denominator as well to make sure that FDR is always [0-1].