We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e9b83c commit 31fa225Copy full SHA for 31fa225
1 file changed
psm_utils/io/flashlfq.py
@@ -194,7 +194,13 @@ def write_file(self, psm_list: PSMList):
194
target_mask = np.ones(len(psm_list), dtype=bool)
195
196
# Filter out PSMs above FDR threshold
197
- fdr_mask = psm_list["qvalue"] <= self.fdr_threshold
+ if any(psm.qvalue is None for psm in psm_list):
198
+ LOGGER.warning(
199
+ "Not all PSMs have a q-value. Skipping FDR filtering for FlashLFQ file."
200
+ )
201
+ fdr_mask = np.ones(len(psm_list), dtype=bool)
202
+ else:
203
+ fdr_mask = psm_list["qvalue"] <= self.fdr_threshold
204
filtered_by_fdr = (~fdr_mask & target_mask).sum()
205
LOGGER.debug(f"Skipping {filtered_by_fdr} PSMs above FDR threshold for FlashLFQ file.")
206
0 commit comments