snakemake-executor-plugin-sge 0.5.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- snakemake_executor_plugin_sge-0.5.9/PKG-INFO +117 -0
- snakemake_executor_plugin_sge-0.5.9/README.md +96 -0
- snakemake_executor_plugin_sge-0.5.9/pyproject.toml +29 -0
- snakemake_executor_plugin_sge-0.5.9/snakemake_executor_plugin_sge/__init__.py +1128 -0
- snakemake_executor_plugin_sge-0.5.9/snakemake_executor_plugin_sge/job_cancellation.py +34 -0
- snakemake_executor_plugin_sge-0.5.9/snakemake_executor_plugin_sge/job_status_query.py +226 -0
- snakemake_executor_plugin_sge-0.5.9/snakemake_executor_plugin_sge/submit_string.py +505 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: snakemake-executor-plugin-sge
|
|
3
|
+
Version: 0.5.9
|
|
4
|
+
Summary: A Snakemake executor plugin for submitting jobs to SGE/UGE/OGS clusters.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: snakemake,plugin,executor,cluster,sge,uge,gridengine
|
|
7
|
+
Author: Stylianos Charalampous
|
|
8
|
+
Author-email: stylianosc@github.com
|
|
9
|
+
Requires-Python: >=3.11,<4.0
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Requires-Dist: snakemake-interface-common (>=1.21.0,<2.0.0)
|
|
17
|
+
Requires-Dist: snakemake-interface-executor-plugins (>=9.3.9,<10.0.0)
|
|
18
|
+
Project-URL: Repository, https://github.com/stylianosc/snakemake-executor-plugin-sge
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# snakemake-executor-plugin-sge
|
|
22
|
+
|
|
23
|
+
A [Snakemake](https://snakemake.readthedocs.io) executor plugin for
|
|
24
|
+
**Sun Grid Engine (SGE)**, **Univa Grid Engine (UGE)**, and
|
|
25
|
+
**Open Grid Scheduler (OGS)** clusters.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- **Every job is an array job** – singletons become `-t 1-1`, batches become
|
|
30
|
+
`-t 1-N`. One submission path, one tracking path, no special cases.
|
|
31
|
+
- **Group jobs as a single array job** – Snakemake group jobs (several rules
|
|
32
|
+
bundled together) are submitted as one qsub call.
|
|
33
|
+
- **Rich qsub flag coverage** – queue, project, parallel environment, wall
|
|
34
|
+
time, memory (per-slot and total), priority, requeue, reservation, notify,
|
|
35
|
+
mail, hold_jid, task concurrency, env-var export, join logs, and arbitrary
|
|
36
|
+
extra flags.
|
|
37
|
+
- **Per-rule resource overrides** – any global setting can be overridden via
|
|
38
|
+
rule `resources:` (e.g. `sge_queue`, `sge_pe`, `sge_extra`, …).
|
|
39
|
+
- **Two-stage status polling** – `qstat` for in-flight jobs, `qacct` for
|
|
40
|
+
completed jobs; configurable retries and optional qacct disabling.
|
|
41
|
+
- **Clean log management** – per-task stdout/stderr, optional auto-delete on
|
|
42
|
+
success, age-based rotation.
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install snakemake-executor-plugin-sge
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quick start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
snakemake --executor sge --jobs 100
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Common options
|
|
57
|
+
|
|
58
|
+
| CLI flag | Default | Description |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `--sge-queue` | — | Default queue (`-q`) |
|
|
61
|
+
| `--sge-pe` | — | Parallel environment for multi-thread jobs |
|
|
62
|
+
| `--sge-project` | — | Project (`-P`) |
|
|
63
|
+
| `--sge-export-env` | `True` | Export environment (`-V`) |
|
|
64
|
+
| `--sge-join-logs` | `False` | Merge stdout+stderr (`-j y`) |
|
|
65
|
+
| `--sge-requeue` | — | Requeue on failure (`-r y/n`) |
|
|
66
|
+
| `--sge-reservation` | — | Resource reservation (`-R y/n`) |
|
|
67
|
+
| `--sge-notify` | `False` | Send notify signal |
|
|
68
|
+
| `--sge-mail-on` | — | Mail events (`b`, `e`, `a`, `s`, `n`) |
|
|
69
|
+
| `--sge-mail-address` | — | Mail address (`-M`) |
|
|
70
|
+
| `--sge-hold-jid` | — | Hold until job(s) finish |
|
|
71
|
+
| `--sge-array-limit` | `75000` | Max tasks per `qsub -t` call |
|
|
72
|
+
| `--sge-task-concurrency` | — | Max concurrent array tasks (`-tc`) |
|
|
73
|
+
| `--sge-logdir` | `.snakemake/sge_logs` | Log directory |
|
|
74
|
+
| `--sge-keep-successful-logs` | `False` | Keep logs for successful jobs |
|
|
75
|
+
| `--sge-use-qacct` | `True` | Use `qacct` for finished-job detection |
|
|
76
|
+
| `--sge-extra` | — | Raw extra qsub flags (global) |
|
|
77
|
+
| `--sge-jobname-prefix` | — | Prefix for SGE job names |
|
|
78
|
+
|
|
79
|
+
## Per-rule resource overrides
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
rule my_rule:
|
|
83
|
+
resources:
|
|
84
|
+
runtime = 120, # minutes → h_rt=02:00:00
|
|
85
|
+
mem_mb = 8192, # total memory (divided by threads per slot)
|
|
86
|
+
mem_mb_per_cpu = 2048, # per-slot memory (takes precedence)
|
|
87
|
+
threads = 4,
|
|
88
|
+
sge_queue = "highmem.q",
|
|
89
|
+
sge_pe = "smp",
|
|
90
|
+
sge_project = "myproject",
|
|
91
|
+
sge_extra = "-l gpu=1", # arbitrary extra qsub flags
|
|
92
|
+
sge_resources = {"h_cpu": "24:00:00", "arch": "lx-amd64"},
|
|
93
|
+
sge_join_logs = True,
|
|
94
|
+
sge_requeue = True,
|
|
95
|
+
sge_priority = -100,
|
|
96
|
+
sge_notify = True,
|
|
97
|
+
sge_mail_on = "e",
|
|
98
|
+
sge_mail_address = "me@example.com",
|
|
99
|
+
sge_hold_jid = "12345",
|
|
100
|
+
sge_task_concurrency = 8,
|
|
101
|
+
sge_export_env = False,
|
|
102
|
+
threads: 4
|
|
103
|
+
shell: "..."
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Array-job design
|
|
107
|
+
|
|
108
|
+
Every qsub submission uses `qsub -t start-end`. Execution commands are
|
|
109
|
+
stored in a JSON file on the shared filesystem before `qsub` is called. The
|
|
110
|
+
submission script reads `$SGE_TASK_ID`, looks up the compressed command, and
|
|
111
|
+
evaluates it. This avoids command-line length limits and all heredoc/quoting
|
|
112
|
+
problems.
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
MIT
|
|
117
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# snakemake-executor-plugin-sge
|
|
2
|
+
|
|
3
|
+
A [Snakemake](https://snakemake.readthedocs.io) executor plugin for
|
|
4
|
+
**Sun Grid Engine (SGE)**, **Univa Grid Engine (UGE)**, and
|
|
5
|
+
**Open Grid Scheduler (OGS)** clusters.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Every job is an array job** – singletons become `-t 1-1`, batches become
|
|
10
|
+
`-t 1-N`. One submission path, one tracking path, no special cases.
|
|
11
|
+
- **Group jobs as a single array job** – Snakemake group jobs (several rules
|
|
12
|
+
bundled together) are submitted as one qsub call.
|
|
13
|
+
- **Rich qsub flag coverage** – queue, project, parallel environment, wall
|
|
14
|
+
time, memory (per-slot and total), priority, requeue, reservation, notify,
|
|
15
|
+
mail, hold_jid, task concurrency, env-var export, join logs, and arbitrary
|
|
16
|
+
extra flags.
|
|
17
|
+
- **Per-rule resource overrides** – any global setting can be overridden via
|
|
18
|
+
rule `resources:` (e.g. `sge_queue`, `sge_pe`, `sge_extra`, …).
|
|
19
|
+
- **Two-stage status polling** – `qstat` for in-flight jobs, `qacct` for
|
|
20
|
+
completed jobs; configurable retries and optional qacct disabling.
|
|
21
|
+
- **Clean log management** – per-task stdout/stderr, optional auto-delete on
|
|
22
|
+
success, age-based rotation.
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install snakemake-executor-plugin-sge
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
snakemake --executor sge --jobs 100
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Common options
|
|
37
|
+
|
|
38
|
+
| CLI flag | Default | Description |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `--sge-queue` | — | Default queue (`-q`) |
|
|
41
|
+
| `--sge-pe` | — | Parallel environment for multi-thread jobs |
|
|
42
|
+
| `--sge-project` | — | Project (`-P`) |
|
|
43
|
+
| `--sge-export-env` | `True` | Export environment (`-V`) |
|
|
44
|
+
| `--sge-join-logs` | `False` | Merge stdout+stderr (`-j y`) |
|
|
45
|
+
| `--sge-requeue` | — | Requeue on failure (`-r y/n`) |
|
|
46
|
+
| `--sge-reservation` | — | Resource reservation (`-R y/n`) |
|
|
47
|
+
| `--sge-notify` | `False` | Send notify signal |
|
|
48
|
+
| `--sge-mail-on` | — | Mail events (`b`, `e`, `a`, `s`, `n`) |
|
|
49
|
+
| `--sge-mail-address` | — | Mail address (`-M`) |
|
|
50
|
+
| `--sge-hold-jid` | — | Hold until job(s) finish |
|
|
51
|
+
| `--sge-array-limit` | `75000` | Max tasks per `qsub -t` call |
|
|
52
|
+
| `--sge-task-concurrency` | — | Max concurrent array tasks (`-tc`) |
|
|
53
|
+
| `--sge-logdir` | `.snakemake/sge_logs` | Log directory |
|
|
54
|
+
| `--sge-keep-successful-logs` | `False` | Keep logs for successful jobs |
|
|
55
|
+
| `--sge-use-qacct` | `True` | Use `qacct` for finished-job detection |
|
|
56
|
+
| `--sge-extra` | — | Raw extra qsub flags (global) |
|
|
57
|
+
| `--sge-jobname-prefix` | — | Prefix for SGE job names |
|
|
58
|
+
|
|
59
|
+
## Per-rule resource overrides
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
rule my_rule:
|
|
63
|
+
resources:
|
|
64
|
+
runtime = 120, # minutes → h_rt=02:00:00
|
|
65
|
+
mem_mb = 8192, # total memory (divided by threads per slot)
|
|
66
|
+
mem_mb_per_cpu = 2048, # per-slot memory (takes precedence)
|
|
67
|
+
threads = 4,
|
|
68
|
+
sge_queue = "highmem.q",
|
|
69
|
+
sge_pe = "smp",
|
|
70
|
+
sge_project = "myproject",
|
|
71
|
+
sge_extra = "-l gpu=1", # arbitrary extra qsub flags
|
|
72
|
+
sge_resources = {"h_cpu": "24:00:00", "arch": "lx-amd64"},
|
|
73
|
+
sge_join_logs = True,
|
|
74
|
+
sge_requeue = True,
|
|
75
|
+
sge_priority = -100,
|
|
76
|
+
sge_notify = True,
|
|
77
|
+
sge_mail_on = "e",
|
|
78
|
+
sge_mail_address = "me@example.com",
|
|
79
|
+
sge_hold_jid = "12345",
|
|
80
|
+
sge_task_concurrency = 8,
|
|
81
|
+
sge_export_env = False,
|
|
82
|
+
threads: 4
|
|
83
|
+
shell: "..."
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Array-job design
|
|
87
|
+
|
|
88
|
+
Every qsub submission uses `qsub -t start-end`. Execution commands are
|
|
89
|
+
stored in a JSON file on the shared filesystem before `qsub` is called. The
|
|
90
|
+
submission script reads `$SGE_TASK_ID`, looks up the compressed command, and
|
|
91
|
+
evaluates it. This avoids command-line length limits and all heredoc/quoting
|
|
92
|
+
problems.
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "snakemake-executor-plugin-sge"
|
|
3
|
+
version = "0.5.9"
|
|
4
|
+
description = "A Snakemake executor plugin for submitting jobs to SGE/UGE/OGS clusters."
|
|
5
|
+
authors = ["Stylianos Charalampous <stylianosc@github.com>"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
repository = "https://github.com/stylianosc/snakemake-executor-plugin-sge"
|
|
9
|
+
keywords = ["snakemake", "plugin", "executor", "cluster", "sge", "uge", "gridengine"]
|
|
10
|
+
|
|
11
|
+
[tool.poetry.dependencies]
|
|
12
|
+
python = "^3.11"
|
|
13
|
+
snakemake-interface-common = "^1.21.0"
|
|
14
|
+
snakemake-interface-executor-plugins = "^9.3.9"
|
|
15
|
+
|
|
16
|
+
[tool.poetry.group.dev.dependencies]
|
|
17
|
+
black = "^23.7.0"
|
|
18
|
+
flake8 = "^6.1.0"
|
|
19
|
+
pytest = "^8.3.5"
|
|
20
|
+
|
|
21
|
+
[tool.black]
|
|
22
|
+
line-length = 88
|
|
23
|
+
|
|
24
|
+
[tool.pytest.ini_options]
|
|
25
|
+
python_files = ["test_*.py"]
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
requires = ["poetry-core"]
|
|
29
|
+
build-backend = "poetry.core.masonry.api"
|