Skip to content

Commit 1242176

Browse files
committed
add full results flag
1 parent 300a18a commit 1242176

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

config/nplinker.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ parameters = "version1_parameters_or_version2_parameters"
8080
# BiG-SCPAPE v2 also runs a `--mix` analysis by default, so you don't need to set this parameter here.
8181
# An example value could be: "--mibig-version 3.1 --include-singletons --gcf-cutoffs 0.30"
8282

83+
full_results = false
84+
# [REQUIRED-UNDER-CONDITIONS] Only required for BiG-SCAPE 2
85+
# Whether to generate a full set of results instead of only the output database for BiG-SCAPE 2
86+
8387
[gnps]
8488
# Settings for GNPS.
8589

src/nplinker/arranger.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ def _run_bigscape(self) -> None:
319319
self.bigscape_running_output_dir,
320320
self.config.bigscape.parameters,
321321
version,
322+
self.config.bigscape.full_results
322323
)
323324

324325
if version == "1":

src/nplinker/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def load_config(config_file: str | PathLike) -> Dynaconf:
7070
Validator("bigscape.parameters", is_type_of=str),
7171
Validator("bigscape.cutoff", required=True, is_type_of=str),
7272
Validator("bigscape.version", required=True, is_type_of=str, is_in=["1", "2"]),
73+
Validator("bigscape.full_results", required=True, when=Validator("bigscape.version", eq="2"), is_type_of=bool),
7374
# GNPS
7475
Validator("gnps.version", required=True, is_type_of=str, is_in=["1", "2"]),
7576
# Scoring

src/nplinker/genomics/bigscape/runbigscape.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def run_bigscape(
1717
output_path: str | PathLike,
1818
extra_params: str,
1919
version: Literal["1", "2"] = "1",
20+
full_results: bool = False
2021
) -> bool:
2122
"""Runs BiG-SCAPE to cluster BGCs.
2223
@@ -100,10 +101,12 @@ def run_bigscape(
100101
"cluster",
101102
"--pfam-path",
102103
os.path.join(PFAM_PATH, "Pfam-A.hmm"),
103-
"--db-only-output",
104104
]
105105
)
106106

107+
if not full_results:
108+
args.append("--db-only-output")
109+
107110
# add input and output paths. these are unchanged
108111
args.extend(["-i", str(antismash_path), "-o", str(output_path)])
109112

0 commit comments

Comments
 (0)