Skip to content

Commit

Permalink
Handle two quantification table folders of GNPS feature-based workflow (
Browse files Browse the repository at this point in the history
#275)

handle two possible quantification folders
  • Loading branch information
CunliangGeng authored Sep 17, 2024
1 parent eaf3b43 commit b3489a8
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 b3489a8

Please sign in to comment.