Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/nplinker.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ parameters = "version1_parameters_or_version2_parameters"
# BiG-SCPAPE v2 also runs a `--mix` analysis by default, so you don't need to set this parameter here.
# An example value could be: "--mibig-version 3.1 --include-singletons --gcf-cutoffs 0.30"

full_results = false
# [REQUIRED-UNDER-CONDITIONS] Only required for BiG-SCAPE 2
# Whether to generate a full set of results instead of only the output database for BiG-SCAPE 2

[gnps]
# Settings for GNPS.

Expand Down
1 change: 1 addition & 0 deletions src/nplinker/arranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def _run_bigscape(self) -> None:
self.bigscape_running_output_dir,
self.config.bigscape.parameters,
version,
self.config.bigscape.full_results
)

if version == "1":
Expand Down
1 change: 1 addition & 0 deletions src/nplinker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def load_config(config_file: str | PathLike) -> Dynaconf:
Validator("bigscape.parameters", is_type_of=str),
Validator("bigscape.cutoff", required=True, is_type_of=str),
Validator("bigscape.version", required=True, is_type_of=str, is_in=["1", "2"]),
Validator("bigscape.full_results", required=True, when=Validator("bigscape.version", eq="2"), is_type_of=bool),
# GNPS
Validator("gnps.version", required=True, is_type_of=str, is_in=["1", "2"]),
# Scoring
Expand Down
6 changes: 5 additions & 1 deletion src/nplinker/genomics/bigscape/runbigscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def run_bigscape(
output_path: str | PathLike,
extra_params: str,
version: Literal["1", "2"] = "1",
full_results: bool = False
) -> bool:
"""Runs BiG-SCAPE to cluster BGCs.

Expand Down Expand Up @@ -49,6 +50,7 @@ def run_bigscape(
output_path: Path to the output directory where BiG-SCAPE will write its results.
extra_params: Additional parameters to pass to BiG-SCAPE.
version: The version of BiG-SCAPE to run. Must be "1" or "2".
full_results: Whether to generate full results for BiG-SCAPE 2

Returns:
True if BiG-SCAPE ran successfully, False otherwise.
Expand Down Expand Up @@ -100,10 +102,12 @@ def run_bigscape(
"cluster",
"--pfam-path",
os.path.join(PFAM_PATH, "Pfam-A.hmm"),
"--db-only-output",
]
)

if not full_results:
args.append("--db-only-output")

# add input and output paths. these are unchanged
args.extend(["-i", str(antismash_path), "-o", str(output_path)])

Expand Down
Loading