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
9 changes: 9 additions & 0 deletions src/metaDMG/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ def create_config(
rich_help_panel="LCA parameters",
),
# GENERAL PARAMETERS
stopIfErrors: Optional[int] = typer.Option(
0,
"-stopIfErrors",
"-Z",
help="Temporary hack to bypass sorting check if SO tag does not exist in sam header. Values 0 or 1. zero=dont check",
callback=lambda x: cli_utils.is_positive_int_or_None(x),
rich_help_panel="General parameters",
),
metaDMG_cpp: str = typer.Option(
"./metaDMG-cpp",
"--metaDMG-cpp",
Expand Down Expand Up @@ -276,6 +284,7 @@ def create_config(
sample_suffix=sample_suffix,
long_name=long_name,
damage_mode=damage_mode,
stopIfErrors=stopIfErrors,
__version__=__version__,
)

Expand Down
2 changes: 2 additions & 0 deletions src/metaDMG/cli/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ def get_config_dict(
sample_prefix: str = "",
sample_suffix: str = "",
long_name: bool = False,
stopIfErrors: int = 1,
damage_mode: DAMAGE_MODE = DAMAGE_MODE.LCA,
__version__: str = "",
) -> dict:
Expand Down Expand Up @@ -486,6 +487,7 @@ def get_config_dict(
"weight_type": weight_type,
"custom_database": custom_database,
"forward_only": forward_only,
"stopIfErrors": stopIfErrors,
#
"output_dir": output_dir,
"parallel_samples": parallel_samples,
Expand Down
2 changes: 2 additions & 0 deletions src/metaDMG/fit/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def get_LCA_command(config: Config) -> str:
f"-weighttype {config['weight_type']} "
f"-fix_ncbi {config['custom_database']} "
f"-tempfolder {config['path_tmp']}/ "
f"-stopIfErrors {config['stopIfErrors']} "
)
return command[:-1]

Expand Down Expand Up @@ -145,6 +146,7 @@ def get_damage_command(config: Config) -> str:
f"--runmode {runmode} "
f"--outname {outname} "
f"{config['bam']} "
f"-stopIfErrors {config['stopIfErrors']} "
)
return command[:-1]

Expand Down
1 change: 1 addition & 0 deletions src/metaDMG/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def make_configs(
d.setdefault("cores_per_sample", 1)
d.setdefault("damage_mode", "lca")
d.setdefault("min_reads", 0)
d.setdefault("stopIfErrors", 1)
d["force"] = force

paths = ["names", "nodes", "acc2tax", "output_dir", "config_file"]
Expand Down