Skip to content

Commit

Permalink
handle two possible quantification folders
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Sep 16, 2024
1 parent eaf3b43 commit 7b65744
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/nplinker/metabolomics/gnps/gnps_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 7b65744

Please sign in to comment.