Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
6383151
test interactive submit
mathiasbio Mar 14, 2025
a7dda87
update sbatch
mathiasbio Mar 14, 2025
9e57413
remove config
mathiasbio Mar 14, 2025
c1dcd91
fix
mathiasbio Mar 14, 2025
ddfe39b
remove script dir
mathiasbio Mar 14, 2025
8236630
fix
mathiasbio Mar 14, 2025
bfb2b46
add sbatch command
mathiasbio Mar 14, 2025
c7ef6df
add profile
mathiasbio Mar 17, 2025
e7a401d
fix
mathiasbio Mar 17, 2025
2608896
fix
mathiasbio Mar 18, 2025
630325a
add log paths and fix bugs
mathiasbio Mar 18, 2025
6323665
update
mathiasbio Mar 18, 2025
c2b1381
fix
mathiasbio Mar 18, 2025
f58cafa
remove jobscript
mathiasbio Mar 18, 2025
b9f52a7
add jobname
mathiasbio Mar 18, 2025
afa38b0
jobname doesn't do anything
mathiasbio Mar 18, 2025
6b1cd81
fix max mb
mathiasbio Mar 18, 2025
5b91e54
add new option
mathiasbio Mar 18, 2025
65a624c
add resources
mathiasbio Mar 18, 2025
323ec62
Merge branch 'release_v17.0.0' of github.com:Clinical-Genomics/BALSAM…
mathiasbio Mar 19, 2025
7baf124
Merge branch 'release_v17.0.0' into change_submit_method
mathiasbio Mar 19, 2025
e287db9
add threads and mem
mathiasbio Mar 19, 2025
2cc46b8
keep adding threads
mathiasbio Mar 19, 2025
b0a3fed
mem
mathiasbio Mar 24, 2025
8d2a445
start moving threads to profile
mathiasbio Mar 24, 2025
63fe4f0
lower sleep
mathiasbio Mar 24, 2025
0799478
fix
mathiasbio Mar 24, 2025
58aaafd
move resources to profile
mathiasbio Mar 24, 2025
da49f44
update
mathiasbio Mar 24, 2025
592cfb3
update
mathiasbio Mar 24, 2025
2628885
cleanup
mathiasbio Mar 24, 2025
dc305e8
fix
mathiasbio Mar 24, 2025
32d8750
update and add retries 3
mathiasbio Mar 25, 2025
782e798
add more resources
mathiasbio Mar 25, 2025
ec7978f
more
mathiasbio Mar 25, 2025
c74dcda
move config to workflow profile
mathiasbio Mar 25, 2025
809ee10
change mb
mathiasbio Mar 25, 2025
0f672b0
resources
mathiasbio Mar 25, 2025
a3f71cd
test new
mathiasbio Mar 25, 2025
11ecfb4
move threads
mathiasbio Mar 25, 2025
5df6547
update threads
mathiasbio Mar 25, 2025
b4332d7
reformat threads
mathiasbio Mar 25, 2025
dc13fa6
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 25, 2025
f7ca304
remove threads
mathiasbio Mar 25, 2025
0d65ae3
fix
mathiasbio Mar 25, 2025
b6092c2
increase mem
mathiasbio Mar 26, 2025
896502c
remove
mathiasbio Mar 26, 2025
0d26f38
test add logfile
mathiasbio Mar 26, 2025
16955a5
fix
mathiasbio Mar 26, 2025
10c3c19
clean up options
mathiasbio Mar 26, 2025
34265ef
begin to fix init
mathiasbio Mar 26, 2025
e3fbace
fix
mathiasbio Mar 26, 2025
53a72ce
add more log info
mathiasbio Mar 26, 2025
c1bae91
add logging to config case
mathiasbio Mar 26, 2025
489dddc
exist ok
mathiasbio Mar 26, 2025
a4e1173
add attempt
mathiasbio Mar 26, 2025
2e80be3
test retries
mathiasbio Mar 26, 2025
bfdddf2
fix
mathiasbio Mar 26, 2025
5dd2cd5
update snakemake
mathiasbio Mar 26, 2025
14b19b8
update yte
mathiasbio Mar 26, 2025
69373f0
change graph method
mathiasbio Mar 26, 2025
32bdc52
fix
mathiasbio Mar 26, 2025
8ec325d
clean up threads
mathiasbio Mar 26, 2025
00cd3d5
cleanup
mathiasbio Mar 26, 2025
e791e50
test
mathiasbio Mar 26, 2025
29c8180
fix graph dag
mathiasbio Mar 27, 2025
2e893bd
dynamic
mathiasbio Mar 27, 2025
b4710fd
change to equal
mathiasbio Mar 27, 2025
25c3e98
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 27, 2025
2afed53
Revert "dynamic"
mathiasbio Mar 27, 2025
d49293b
Revert "change to equal"
mathiasbio Mar 27, 2025
c421297
remove attempt
mathiasbio Mar 27, 2025
7a1d198
remove threads
mathiasbio Mar 27, 2025
5e26b08
test
mathiasbio Mar 27, 2025
49f89d5
change yaml format
mathiasbio Mar 27, 2025
98358b4
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 27, 2025
6054eca
clean up
mathiasbio Mar 27, 2025
5fe92e3
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 27, 2025
03e2286
reformat
mathiasbio Mar 27, 2025
4058fc7
reformat
mathiasbio Mar 27, 2025
4b664b3
revert to yaml structure
mathiasbio Mar 27, 2025
463751b
test
mathiasbio Mar 27, 2025
308b8cd
add slurm options
mathiasbio Mar 27, 2025
962e974
tsst
mathiasbio Mar 27, 2025
e92d689
testing
mathiasbio Mar 27, 2025
b5105ca
account
mathiasbio Mar 27, 2025
5083bf1
test
mathiasbio Mar 27, 2025
84f739c
test write new config yaml
mathiasbio Mar 27, 2025
14e8e88
fix
mathiasbio Mar 27, 2025
cbb8573
fix
mathiasbio Mar 27, 2025
3eb2813
fix quotes
mathiasbio Mar 27, 2025
8114baf
fix
mathiasbio Mar 28, 2025
2fe65d3
revert
mathiasbio Mar 28, 2025
024042f
Revert "Merge branch 'change_submit_method' of github.com:Clinical-Ge…
mathiasbio Mar 28, 2025
08146b7
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Mar 28, 2025
4d1ac80
revert snakemake
mathiasbio Mar 28, 2025
90e7890
REVERT DAG
mathiasbio Mar 28, 2025
4ee48fd
fix
mathiasbio Mar 28, 2025
6e94598
restore config
mathiasbio Mar 28, 2025
234cc80
add slurm yaml
mathiasbio Mar 28, 2025
975ff62
worth a try
mathiasbio Mar 28, 2025
198dbb0
move mem to dynamic resource
mathiasbio Mar 28, 2025
05c48ef
fix
mathiasbio Mar 28, 2025
e17a41f
increase mem
mathiasbio Mar 28, 2025
19f9b1b
refactor
mathiasbio Mar 28, 2025
a66485b
mem
mathiasbio Mar 28, 2025
2f87f71
increase mem
mathiasbio Mar 28, 2025
d3782b0
mem wgs align
mathiasbio Mar 28, 2025
d9a2d68
add init
mathiasbio Apr 8, 2025
8196874
clean up
mathiasbio Apr 8, 2025
8f6ad56
remove cluster env
mathiasbio Apr 9, 2025
153b688
refactor code
mathiasbio Apr 9, 2025
8fd0823
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Apr 14, 2025
74a75e4
Merge branch 'develop' into change_submit_method
mathiasbio Apr 14, 2025
a756d2f
mem fix
mathiasbio Apr 14, 2025
799d057
change mem according to benchmark files
mathiasbio Apr 14, 2025
dbd6e37
add r
mathiasbio Apr 15, 2025
53bafbd
update threads
mathiasbio Apr 16, 2025
42b7d74
test adding mail func
mathiasbio Apr 17, 2025
baaa087
test
mathiasbio Apr 17, 2025
7807e94
remove email functionality
mathiasbio Apr 17, 2025
4dc3a66
clean up
mathiasbio Apr 17, 2025
81fca1b
clean
mathiasbio Apr 17, 2025
8a33122
fix
mathiasbio Apr 17, 2025
4fb4795
clean up
mathiasbio Apr 22, 2025
17c75a1
fix pytests
mathiasbio Apr 24, 2025
82c3e26
fix pytests
mathiasbio Apr 24, 2025
e9a42ac
black
mathiasbio Apr 24, 2025
0a12ec2
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Apr 24, 2025
8931641
Merge branch 'develop' into change_submit_method
mathiasbio Apr 24, 2025
89bd073
Merge develop and changelog
mathiasbio Apr 24, 2025
16f63ae
add logger test
mathiasbio Apr 25, 2025
9bf65e0
add sbatch pytest
mathiasbio Apr 25, 2025
ea0bf39
test
mathiasbio Apr 30, 2025
b3812b9
cap mem
mathiasbio May 5, 2025
a2529bf
fix
mathiasbio May 5, 2025
e9626a1
restore resources
mathiasbio May 6, 2025
978599d
adjust mem and time
mathiasbio May 7, 2025
108add1
add partition core
mathiasbio May 8, 2025
ec8ae7f
remove test
mathiasbio May 12, 2025
2c6d18c
black
mathiasbio May 12, 2025
ed36c56
test
mathiasbio May 12, 2025
a8fb39f
test
mathiasbio May 12, 2025
d882d02
nothing
mathiasbio May 12, 2025
1615e9f
black
mathiasbio May 12, 2025
7dc87e1
fix
mathiasbio May 12, 2025
0738dd7
add logs
mathiasbio May 12, 2025
c1b76c0
black
mathiasbio May 12, 2025
846cf7d
remove test
mathiasbio May 12, 2025
0eef24d
black
mathiasbio May 12, 2025
c003549
add analysis status check to snakemake master job
mathiasbio May 15, 2025
b0199d5
fix variable
mathiasbio May 15, 2025
cea15bc
add success status check
mathiasbio May 23, 2025
80be77b
add resources
mathiasbio May 23, 2025
37267d3
change resources
mathiasbio May 26, 2025
0c9aeea
fix
mathiasbio May 26, 2025
aa722c0
add job status check
mathiasbio May 27, 2025
cf4bd51
black
mathiasbio May 27, 2025
1097cba
add to init
mathiasbio May 27, 2025
7dbb730
add cancel check state
mathiasbio May 28, 2025
997ad63
fix test
mathiasbio May 28, 2025
6b5b9ea
refactor code
mathiasbio May 28, 2025
aa63863
black
mathiasbio May 28, 2025
2d3e34b
remove retries
mathiasbio May 28, 2025
011a6a0
remove shell true
mathiasbio May 28, 2025
c03d9a7
black
mathiasbio May 28, 2025
ad6aa04
add description
mathiasbio May 28, 2025
8b64154
fix pytest
mathiasbio Jun 2, 2025
2b0a65d
fix pytests
mathiasbio Jun 2, 2025
4a77c5b
add qc error to status
mathiasbio Jun 2, 2025
edb3a83
fix
mathiasbio Jun 2, 2025
3ffca6d
append write statusfile
mathiasbio Jun 2, 2025
19f84d6
restore
mathiasbio Jun 2, 2025
ec403e8
test new options
mathiasbio Jun 2, 2025
0e4e6bd
mem
mathiasbio Jun 2, 2025
ba66a56
testing logs
mathiasbio Jun 2, 2025
bd0ed50
fix
mathiasbio Jun 2, 2025
16b4378
add cluster status script
mathiasbio Jun 3, 2025
b9ec70c
remove
mathiasbio Jun 3, 2025
9f77377
fix
mathiasbio Jun 3, 2025
947ffbd
fix
mathiasbio Jun 3, 2025
a8d1b59
fix
mathiasbio Jun 3, 2025
8fc8743
update state check
mathiasbio Jun 3, 2025
91ddb69
mem
mathiasbio Jun 3, 2025
d15050c
fix permission after install
mathiasbio Jun 3, 2025
658335a
fix
mathiasbio Jun 3, 2025
95df709
fix bug
mathiasbio Jun 4, 2025
00fb129
fix pytest
mathiasbio Jun 4, 2025
94f8a86
increase mem
mathiasbio Jun 4, 2025
b897400
increase mem
mathiasbio Jun 4, 2025
70ec4ab
fix codefactor issues
mathiasbio Jun 4, 2025
63e0ff4
increase mem
mathiasbio Jun 11, 2025
b51a6b8
increase mem
mathiasbio Jun 11, 2025
36c6969
add 1 retry
mathiasbio Jun 12, 2025
6403b4d
fix delly
mathiasbio Jun 16, 2025
2dc57b2
clean up
mathiasbio Jul 9, 2025
bff6a7f
Merge branch 'develop' of github.com:Clinical-Genomics/BALSAMIC into …
mathiasbio Jul 9, 2025
f7b4ec2
clean up merge conflict and add to changelog
mathiasbio Jul 9, 2025
9620b21
add logging pytest
mathiasbio Jul 9, 2025
ac63e42
increase mem
mathiasbio Jul 14, 2025
610bc83
add d4tools container
mathiasbio Jul 21, 2025
58d7998
update dockerfile
mathiasbio Jul 21, 2025
5cc6403
Merge branch 'develop' into chanjo2_activation
mathiasbio Jul 21, 2025
26d6346
add test script
mathiasbio Jul 21, 2025
c6ca7c6
Merge branch 'chanjo2_activation' of github.com:Clinical-Genomics/BAL…
mathiasbio Jul 21, 2025
9f15c81
remove wrong test
mathiasbio Jul 22, 2025
e4636f5
add rule
mathiasbio Jul 22, 2025
c7912f5
Merge branch 'change_submit_method' into chanjo2_activation
mathiasbio Jul 22, 2025
d0fe08b
Merge branch 'chanjo2_activation' of github.com:Clinical-Genomics/BAL…
mathiasbio Jul 22, 2025
a9ab4a1
add d4rule
mathiasbio Jul 22, 2025
4cb9f8e
fix
mathiasbio Jul 22, 2025
19c4db1
fix
mathiasbio Jul 22, 2025
b6ac53c
fix sonarcloud complaints
mathiasbio Jul 22, 2025
e6aa351
add d4 to umi workflow
mathiasbio Jul 23, 2025
b2caf2e
add d4 output to the all rule
mathiasbio Jul 23, 2025
a912b96
increase mem
mathiasbio Jul 23, 2025
d8dbddb
Merge branch 'change_submit_method' of github.com:Clinical-Genomics/B…
mathiasbio Jul 23, 2025
614b67c
Merge branch 'change_submit_method' into chanjo2_activation
mathiasbio Jul 23, 2025
464a225
change tags
mathiasbio Jul 24, 2025
979d0d6
tags
mathiasbio Jul 24, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_publish_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: true
matrix:
container-name: [align_qc, annotate, ascatNgs, cadd, cnvkit, cnvpytor, coverage_qc, delly, gatk, htslib, multiqc, msisensorpro, purecn, somalier, varcall_py3, varcall_py27, vcf2cytosure]
container-name: [align_qc, annotate, ascatNgs, cadd, cnvkit, cnvpytor, coverage_qc, delly, d4tools, gatk, htslib, multiqc, msisensorpro, purecn, somalier, varcall_py3, varcall_py27, vcf2cytosure]
steps:
- name: Git checkout
id: git_checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: true
matrix:
container-name: [align_qc, annotate, ascatNgs, cadd, cnvkit, cnvpytor, coverage_qc, delly, gatk, htslib, msisensorpro, multiqc, purecn, somalier, varcall_py3, varcall_py27, vcf2cytosure]
container-name: [align_qc, annotate, ascatNgs, cadd, cnvkit, cnvpytor, coverage_qc, delly, d4tools, gatk, htslib, msisensorpro, multiqc, purecn, somalier, varcall_py3, varcall_py27, vcf2cytosure]
steps:
- name: Git checkout
id: git_checkout
Expand Down
27 changes: 27 additions & 0 deletions BALSAMIC/assets/scripts/cluster_job_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

import subprocess
import sys

jobid = sys.argv[1]

try:
output = subprocess.check_output(
["/usr/bin/sacct", "-j", jobid, "--format=State", "--noheader"],
stderr=subprocess.DEVNULL,
)
state = output.decode().split()[0].strip()
except subprocess.CalledProcessError:
# Job not found, maybe it was purged
print("unknown")
sys.exit(0)

# Normalize states for Snakemake
if "COMPLETED" in state:
print("success")
elif any(
x in state for x in ["FAILED", "CANCELLED", "TIMEOUT", "NODE_FAIL", "OUT_OF_MEMORY"]
):
print("failed")
else:
print("running")
78 changes: 0 additions & 78 deletions BALSAMIC/assets/scripts/immediate_submit.py

This file was deleted.

94 changes: 94 additions & 0 deletions BALSAMIC/assets/scripts/scan_finished_jobid_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import click
import re
import subprocess
from pathlib import Path


def extract_job_ids(log_dir):
jobid_pattern = re.compile(r"\.(\d+)\.(?:out|err)$")
return {
match.group(1)
for file in log_dir.iterdir()
if (match := jobid_pattern.search(file.name))
}


def get_job_state(jobid):
try:
result = subprocess.run(
["/usr/bin/scontrol", "show", "job", jobid],
capture_output=True,
text=True,
check=True,
)
return result.stdout
except subprocess.CalledProcessError:
click.echo(f"Could not check job {jobid} (may not exist).")
return None


def extract_stderr_path(output_text):
match = re.search(r"StdErr=(\S+)", output_text)
return match.group(1) if match else "N/A"


def categorize_job(jobid, output_text, failed, cancelled):
stderr_path = extract_stderr_path(output_text)
if "JobState=FAILED" in output_text:
failed.append((jobid, stderr_path))
elif "JobState=CANCELLED" in output_text:
cancelled.append((jobid, stderr_path))


def write_results(output_file, failed, cancelled):
with output_file.open("a") as out_f:
if failed:
out_f.write("Failed jobs:\n")
for jobid, stderr in failed:
out_f.write(f"{jobid}\t{stderr}\n")
elif cancelled:
out_f.write("Cancelled jobs:\n")
for jobid, stderr in cancelled:
out_f.write(f"{jobid}\t{stderr}\n")
else:
click.echo("All jobs completed successfully.")
click.echo(f"Results written to {output_file}")


@click.command()
@click.argument(
"log_dir", type=click.Path(exists=True, file_okay=False, path_type=Path)
)
@click.option(
"--output",
"-o",
required=True,
type=click.Path(writable=True, path_type=Path),
help="Path to output file for failed jobs.",
)
def check_failed_jobs(log_dir: Path, output: Path):
"""
Scan LOG_DIR for SLURM log files (*.out, *.err), extract job IDs,
and check if any jobs have failed or been cancelled using `scontrol show job JOBID`.

If --output is provided, results are written to a file.
"""
job_ids = extract_job_ids(log_dir)

if not job_ids:
click.echo("No job IDs found in log filenames.")
return

failed_jobs_info = []
cancelled_jobs_info = []

for jobid in sorted(job_ids):
output_text = get_job_state(jobid)
if output_text:
categorize_job(jobid, output_text, failed_jobs_info, cancelled_jobs_info)

write_results(output, failed_jobs_info, cancelled_jobs_info)


if __name__ == "__main__":
check_failed_jobs()
29 changes: 27 additions & 2 deletions BALSAMIC/commands/config/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
OPTION_TUMOR_SAMPLE_NAME,
OPTION_UMI_MIN_READS,
)
from BALSAMIC.constants.analysis import BIOINFO_TOOL_ENV, AnalysisWorkflow, Gender
from BALSAMIC.constants.analysis import (
BIOINFO_TOOL_ENV,
AnalysisWorkflow,
Gender,
LogFile,
)
from BALSAMIC.constants.cache import GenomeVersion
from BALSAMIC.constants.constants import FileType
from BALSAMIC.constants.paths import (
Expand All @@ -60,6 +65,7 @@
)
from BALSAMIC.utils.io import read_json, write_json
from BALSAMIC.utils.utils import get_absolute_paths_dict
from BALSAMIC.utils.logging import add_file_logging

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -129,6 +135,21 @@ def case_config(
tumor_sample_name: str,
umi_min_reads: str | None,
):
"""Configure BALSAMIC workflow based on input arguments."""

LOG.info(f"Starting configuring analysis case: {case_id}.")

LOG.info(f"Creating case analysis directory: {analysis_dir}/{case_id}.")
Path(analysis_dir, case_id).mkdir(exist_ok=True)

log_file = Path(analysis_dir, case_id, LogFile.LOGNAME).as_posix()
LOG.info(f"Setting BALSAMIC logfile path to: {log_file}.")
add_file_logging(log_file, logger_name=__name__)

LOG.info(f"Running BALSAMIC version {balsamic_version} -- CONFIG CASE")
LOG.info(f"BALSAMIC started with log level {context.obj['log_level']}.")

LOG.info("Collecting reference and annotation file paths.")
references_path: Path = Path(balsamic_cache, cache_version, genome_version)
references: Dict[str, Path] = get_absolute_paths_dict(
base_path=references_path,
Expand All @@ -154,7 +175,6 @@ def case_config(
if path is not None
}
)

variants_observations = {
"artefact_snv_observations": artefact_snv_observations,
"clinical_snv_observations": clinical_snv_observations,
Expand All @@ -172,10 +192,13 @@ def case_config(
if path is not None
}
)
LOG.info(f"Collected references: {references}")

analysis_fastq_dir: str = get_analysis_fastq_files_directory(
case_dir=Path(analysis_dir, case_id).as_posix(), fastq_path=fastq_path
)
LOG.info(f"Prepared analysis fastq-dir: {analysis_fastq_dir}")

result_dir: Path = Path(analysis_dir, case_id, "analysis")
log_dir: Path = Path(analysis_dir, case_id, "logs")
script_dir: Path = Path(analysis_dir, case_id, "scripts")
Expand All @@ -186,6 +209,8 @@ def case_config(
for directory in [result_dir, log_dir, script_dir, benchmark_dir]:
directory.mkdir(exist_ok=True)

LOG.info("Created analysis and log directories.")
LOG.info("Validating configuration data in pydantic model.")
config_collection_dict = ConfigModel(
sentieon={
"sentieon_install_dir": sentieon_install_dir,
Expand Down
29 changes: 9 additions & 20 deletions BALSAMIC/commands/init/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
from BALSAMIC.commands.options import (
OPTION_CACHE_VERSION,
OPTION_CLUSTER_ACCOUNT,
OPTION_CLUSTER_CONFIG,
OPTION_CLUSTER_MAIL,
OPTION_CLUSTER_MAIL_TYPE,
OPTION_CACHE_PROFILE,
OPTION_CLUSTER_PROFILE,
OPTION_CLUSTER_QOS,
OPTION_COSMIC_KEY,
Expand All @@ -31,16 +29,14 @@
from BALSAMIC.constants.cache import REFERENCE_FILES, GenomeVersion
from BALSAMIC.constants.cluster import (
QOS,
ClusterConfigType,
ClusterMailType,
ClusterProfile,
)
from BALSAMIC.models.cache import CacheConfig, ReferencesCanFam, ReferencesHg
from BALSAMIC.models.snakemake import SnakemakeExecutable
from BALSAMIC.utils.analysis import get_cache_singularity_bind_paths
from BALSAMIC.utils.cache import get_containers
from BALSAMIC.utils.cli import get_config_path, get_snakefile
from BALSAMIC.utils.cli import get_snakefile
from BALSAMIC.utils.io import generate_workflow_graph, write_json
from BALSAMIC.utils.rule import get_script_path

LOG = logging.getLogger(__name__)

Expand All @@ -51,10 +47,8 @@
@OPTION_OUT_DIR
@OPTION_CACHE_VERSION
@OPTION_CLUSTER_ACCOUNT
@OPTION_CLUSTER_CONFIG
@OPTION_CLUSTER_MAIL
@OPTION_CLUSTER_MAIL_TYPE
@OPTION_CLUSTER_PROFILE
@OPTION_CACHE_PROFILE
@OPTION_CLUSTER_QOS
@OPTION_COSMIC_KEY
@OPTION_FORCE_ALL
Expand All @@ -69,14 +63,12 @@ def initialize(
context: click.Context,
account: Optional[str],
cache_version: str,
cluster_config: Path,
cosmic_key: str,
force_all: bool,
genome_version: GenomeVersion,
mail_type: Optional[ClusterMailType],
mail_user: Optional[str],
out_dir: str,
profile: ClusterProfile,
cluster_profile: Path,
cache_profile: Path,
qos: QOS,
quiet: bool,
run_analysis: bool,
Expand Down Expand Up @@ -149,15 +141,12 @@ def initialize(
snakemake_executable: SnakemakeExecutable = SnakemakeExecutable(
account=account,
case_id=cache_config.analysis.case_id,
cluster_config_path=cluster_config
if cluster_config
else get_config_path(ClusterConfigType.CACHE),
config_path=config_path,
force=force_all,
log_dir=log_dir,
mail_type=mail_type,
mail_user=mail_user,
profile=profile,
cluster_profile=cluster_profile,
cluster_job_status_script=get_script_path("cluster_job_status.py"),
workflow_profile=cache_profile,
qos=qos,
quiet=quiet,
run_analysis=run_analysis,
Expand Down
Loading
Loading