From 7b65744558a848807b25010016bee8e4552bfdb4 Mon Sep 17 00:00:00 2001 From: Cunliang Geng Date: Mon, 16 Sep 2024 13:49:52 +0200 Subject: [PATCH] handle two possible quantification folders --- src/nplinker/metabolomics/gnps/gnps_extractor.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/nplinker/metabolomics/gnps/gnps_extractor.py b/src/nplinker/metabolomics/gnps/gnps_extractor.py index 05d480c8..0e49a58c 100644 --- a/src/nplinker/metabolomics/gnps/gnps_extractor.py +++ b/src/nplinker/metabolomics/gnps/gnps_extractor.py @@ -148,9 +148,18 @@ def _extract_snetsv2(self): os.renames(self._extract_path / member, self._extract_path / fname) def _extract_fbmn(self): + # there might be two folders for quantification table + # "quantification_table_reformatted" and "quantification_table" + try: + quantification_table_member = self._select_member( + "quantification_table_reformatted", ".csv" + ) + except ValueError: + quantification_table_member = self._select_member("quantification_table", ".csv") + # the order of members matters members = [ - self._select_member("quantification_table", ".csv"), + quantification_table_member, self._select_member("spectra", ".mgf"), self._select_member("networkedges_selfloop", ".selfloop"), self._select_member("DB_result", ".tsv"),