Skill Tracer
Skills › Scientific Agent Skills › dnanexus-integration › job-execution.md

job-execution.md

484 lines · skills/dnanexus-integration/references/job-execution.md at 5f2bc03

Open on GitHub
1# Jobs, Analyses, and Execution
2

Jobs, Analyses, and Execution

Raw lines 1 to 2
3## Quick Navigation
4
5- [Concepts and preflight](#concepts)
6- [Launch apps/applets](#launch-an-app-or-applet)
7- [Launch workflows](#launch-a-workflow)
8- [Lifecycle and monitoring](#lifecycle)
9- [Safe waits and outputs](#wait-safely-with-dxpy)
10- [Subjobs and reuse](#scattergather-with-subjobs)
11- [Instances and restarts](#instance-selection)
12- [Cost controls](#cost-controls)
13- [Failure triage](#failure-triage)
14- [Rerun and termination](#rerun)

Quick Navigation

  • Concepts and preflight
  • Launch apps/applets
  • Launch workflows
  • Lifecycle and monitoring
  • Safe waits and outputs
  • Subjobs and reuse
  • Instances and restarts
  • Cost controls
  • Failure triage
  • Rerun and termination
Raw lines 3 to 15
16## Concepts
18- **Job** (`job-...`): execution of one app or applet entry point.
19- **Analysis** (`analysis-...`): execution of a workflow and its stages.
20- **Origin execution**: user-initiated root of an execution tree.
21- **Master job**: app/applet run with its own temporary workspace.
22- **Subjob**: another entry point created with `/job/new`; normally shares its
23 parent job's workspace.
24- **Job-based object reference (JBOR)**: dependency on a field of another
25 execution's future output.
27Do not treat `analysis-...` as a job. Use `DXAnalysis` and
28`find_analyses()` for workflow runs.

Concepts

  • Job (job-...): execution of one app or applet entry point.
  • Analysis (analysis-...): execution of a workflow and its stages.
  • Origin execution: user-initiated root of an execution tree.
  • Master job: app/applet run with its own temporary workspace.
  • Subjob: another entry point created with /job/new; normally shares its parent job's workspace.
  • Job-based object reference (JBOR): dependency on a field of another execution's future output.

Do not treat analysis-... as a job. Use DXAnalysis and find_analyses() for workflow runs.

Raw lines 16 to 29
30## Preflight for a Launch
32Before a billable run:
341. Resolve executable to an immutable ID/version.
352. Inspect current input names and types.
363. Resolve every data path to a project-qualified link.
374. Confirm output project/folder.
385. Confirm billing entity and available permission.
396. Review instance/resource policy.
407. Review job reuse and forced reruns.
418. Set an appropriate timeout and cost limit.
429. Confirm tags/properties contain no sensitive values.
4310. Obtain user approval unless the exact run was already requested.
45Inspect CLI inputs:
47```bash
48dx run "applet-xxxx" -h
49dx pwd
50```

Preflight for a Launch

Before a billable run:

  1. Resolve executable to an immutable ID/version.
  2. Inspect current input names and types.
  3. Resolve every data path to a project-qualified link.
  4. Confirm output project/folder.
  5. Confirm billing entity and available permission.
  6. Review instance/resource policy.
  7. Review job reuse and forced reruns.
  8. Set an appropriate timeout and cost limit.
  9. Confirm tags/properties contain no sensitive values.
  10. Obtain user approval unless the exact run was already requested.

Inspect CLI inputs:

dx run "applet-xxxx" -h
dx pwd
Raw lines 30 to 51
52## Launch an App or Applet
54Interactive confirmation is safest:
56```bash
57dx run "applet-xxxx" \
58 --input-json-file "inputs.json" \
59 --destination "project-xxxx:/runs/run-001" \
60 --cost-limit 25
61```
63Use `--yes` only after automation has resolved and validated all targets.
65With dxpy:
67```python
68import dxpy
70job = dxpy.DXApplet(
71 "applet-xxxx",
72 project="project-xxxx",
73).run(
74 {
75 "reads": dxpy.dxlink(
76 "file-xxxx",
77 "project-xxxx",
78 ),
79 "min_quality": 20,
80 },
81 project="project-xxxx",
82 folder="/runs/run-001",
83 name="S001 QC",
84 priority="normal",
85 tags=["qc"],
86 properties={"sample_id": "S001"},
87 cost_limit=25,
90print(job.get_id())
91```
93Never launch by an ambiguous app name when version stability matters. Use an
94app ID/version or an applet ID.

Launch an App or Applet

Interactive confirmation is safest:

dx run "applet-xxxx" \
  --input-json-file "inputs.json" \
  --destination "project-xxxx:/runs/run-001" \
  --cost-limit 25

Use --yes only after automation has resolved and validated all targets.

With dxpy:

import dxpy

job = dxpy.DXApplet(
    "applet-xxxx",
    project="project-xxxx",
).run(
    {
        "reads": dxpy.dxlink(
            "file-xxxx",
            "project-xxxx",
        ),
        "min_quality": 20,
    },
    project="project-xxxx",
    folder="/runs/run-001",
    name="S001 QC",
    priority="normal",
    tags=["qc"],
    properties={"sample_id": "S001"},
    cost_limit=25,
)

print(job.get_id())

Never launch by an ambiguous app name when version stability matters. Use an app ID/version or an applet ID.

Raw lines 52 to 95
96## Launch a Workflow
98CLI:
100```bash
101dx run "workflow-xxxx" \
102 --input-json-file "workflow-inputs.json" \
103 --destination "project-xxxx:/runs/run-002" \
104 --cost-limit 50
105```
107This returns an `analysis-...` ID.
109Python:
111```python
112import dxpy
114analysis = dxpy.DXWorkflow(
115 "workflow-xxxx",
116 project="project-xxxx",
117).run(
118 {
119 "0.reads": dxpy.dxlink(
120 "file-xxxx",
121 "project-xxxx",
122 )
123 },
124 project="project-xxxx",
125 folder="/runs/run-002",
126 cost_limit=50,
128```
130Workflow input keys can use:
132- `"<stage-index>.<input-name>"`
133- `"<stage-name>.<input-name>"`
134- `"<stage-id>.<input-name>"`
135- A promoted workflow-level input name
137Use `dx run workflow-xxxx -h` rather than guessing stage keys.

Launch a Workflow

CLI:

dx run "workflow-xxxx" \
  --input-json-file "workflow-inputs.json" \
  --destination "project-xxxx:/runs/run-002" \
  --cost-limit 50

This returns an analysis-... ID.

Python:

import dxpy

analysis = dxpy.DXWorkflow(
    "workflow-xxxx",
    project="project-xxxx",
).run(
    {
        "0.reads": dxpy.dxlink(
            "file-xxxx",
            "project-xxxx",
        )
    },
    project="project-xxxx",
    folder="/runs/run-002",
    cost_limit=50,
)

Workflow input keys can use:

  • "<stage-index>.<input-name>"
  • "<stage-name>.<input-name>"
  • "<stage-id>.<input-name>"
  • A promoted workflow-level input name

Use dx run workflow-xxxx -h rather than guessing stage keys.

Raw lines 96 to 138
139## Lifecycle
141Successful jobs normally pass:
143```text
144idle → runnable → running → done
145```
147Additional states:
149- `waiting_on_input`: dependency, JBOR, or file closure not ready
150- `waiting_on_output`: descendant/output closure not ready
151- `restartable`: eligible for another try
152- `restarted`: prior try was restarted
153- `terminating`: teardown underway
154- `debug_hold`: failed worker held for approved debugging
155- `failed`: terminal failure
156- `terminated`: terminal user/system termination
158Analyses begin `in_progress` and finish `done`, `failed`, or `terminated`.
159`partially_failed` means at least one stage failed while other stages remain
160non-terminal.
162Jobs normally have a 30-day runtime limit.

Lifecycle

Successful jobs normally pass:

idle → runnable → running → done

Additional states:

  • waiting_on_input: dependency, JBOR, or file closure not ready
  • waiting_on_output: descendant/output closure not ready
  • restartable: eligible for another try
  • restarted: prior try was restarted
  • terminating: teardown underway
  • debug_hold: failed worker held for approved debugging
  • failed: terminal failure
  • terminated: terminal user/system termination

Analyses begin in_progress and finish done, failed, or terminated. partially_failed means at least one stage failed while other stages remain non-terminal.

Jobs normally have a 30-day runtime limit.

Raw lines 139 to 163
164## Monitor
166Recent executions:
168```bash
169dx find executions --created-after=-2h
170dx find jobs --created-after=-2h
171dx find analyses --created-after=-2h
172```
174Failures:
176```bash
177dx find jobs --state failed --created-after=-7d
178dx find executions --include-restarted --created-after=-7d
179```
181Watch a job:
183```bash
184dx watch "job-xxxx"
185dx watch "job-xxxx" --get-stdout
186dx watch "job-xxxx" --get-stderr
187dx watch "job-xxxx" --get-streams
188dx watch "job-xxxx" --tree
189```
191`dx watch` is job-focused. Inspect workflow analyses through `dx find
192executions`, `dx describe analysis-xxxx`, the Monitor UI, and individual stage
193jobs.
195Do not copy logs into public issues without checking for patient identifiers,
196project names, signed URLs, or secrets written by app code.

Monitor

Recent executions:

dx find executions --created-after=-2h
dx find jobs --created-after=-2h
dx find analyses --created-after=-2h

Failures:

dx find jobs --state failed --created-after=-7d
dx find executions --include-restarted --created-after=-7d

Watch a job:

dx watch "job-xxxx"
dx watch "job-xxxx" --get-stdout
dx watch "job-xxxx" --get-stderr
dx watch "job-xxxx" --get-streams
dx watch "job-xxxx" --tree

dx watch is job-focused. Inspect workflow analyses through dx find executions, dx describe analysis-xxxx, the Monitor UI, and individual stage jobs.

Do not copy logs into public issues without checking for patient identifiers, project names, signed URLs, or secrets written by app code.

Raw lines 164 to 197
198## Wait Safely with dxpy
200```python
201from dxpy.exceptions import DXError, DXJobFailureError
203try:
204 job.wait_on_done(interval=10, timeout=6 * 60 * 60)
205except DXJobFailureError as error:
206 status = job.describe(
207 fields={
208 "state": True,
209 "failureReason": True,
210 "failureMessage": True,
211 }
212 )
213 state = status.get("state")
214 if state not in {"failed", "terminated"}:
215 raise TimeoutError(
216 f"local wait ended while remote job state is {state!r}"
217 ) from error
218 reason = status.get("failureReason") or "Terminated"
219 message = status.get("failureMessage") or str(error)
220 raise RuntimeError(f"{reason}: {message}") from error
221except DXError:
222 # SDK/API failure while polling; re-describe before deciding what to do.
223 raise
224```
226Despite its docstring, dxpy 0.415.0 raises `DXJobFailureError` for remote
227failure, termination, **and local wait timeout**. Classify the exception by
228re-describing the remote state. A local timeout does not terminate the remote
229execution.
231`DXAnalysis.wait_on_done()` also requires re-describing the analysis after an
232exception. Only `done`, `failed`, and `terminated` are terminal analysis states.
233`partially_failed` reports a stage failure while other stages are still nonterminal:
234inspect those stages and continue monitoring before cleanup or a replacement launch.
235Do not equate a locally ended wait with completion or termination of the analysis.

Wait Safely with dxpy

from dxpy.exceptions import DXError, DXJobFailureError

try:
    job.wait_on_done(interval=10, timeout=6 * 60 * 60)
except DXJobFailureError as error:
    status = job.describe(
        fields={
            "state": True,
            "failureReason": True,
            "failureMessage": True,
        }
    )
    state = status.get("state")
    if state not in {"failed", "terminated"}:
        raise TimeoutError(
            f"local wait ended while remote job state is {state!r}"
        ) from error
    reason = status.get("failureReason") or "Terminated"
    message = status.get("failureMessage") or str(error)
    raise RuntimeError(f"{reason}: {message}") from error
except DXError:
    # SDK/API failure while polling; re-describe before deciding what to do.
    raise

Despite its docstring, dxpy 0.415.0 raises DXJobFailureError for remote failure, termination, and local wait timeout. Classify the exception by re-describing the remote state. A local timeout does not terminate the remote execution.

DXAnalysis.wait_on_done() also requires re-describing the analysis after an exception. Only done, failed, and terminated are terminal analysis states. partially_failed reports a stage failure while other stages are still nonterminal: inspect those stages and continue monitoring before cleanup or a replacement launch. Do not equate a locally ended wait with completion or termination of the analysis.

Raw lines 198 to 236
237## Outputs
239After success:
241```python
242description = job.describe(fields={"state": True, "output": True})
243outputs = description["output"]
244```
246Output files may still briefly be closing before the job reaches `done`; the
247platform waits for required outputs to resolve.
249For a future output:
251```python
252reference = job.get_output_ref("aligned_bam")
253```
255This is a JBOR. Pass it directly as downstream input:
257```python
258index_job = dxpy.DXApplet("applet-index").run(
259 {"bam": reference},
260 project="project-xxxx",
261 folder="/runs/run-001/index",
262 cost_limit=10,
264```
266The downstream job remains `waiting_on_input` until the upstream field
267resolves. If the upstream execution fails, the dependency fails rather than
268silently receiving a missing value.

Outputs

After success:

description = job.describe(fields={"state": True, "output": True})
outputs = description["output"]

Output files may still briefly be closing before the job reaches done; the platform waits for required outputs to resolve.

For a future output:

reference = job.get_output_ref("aligned_bam")

This is a JBOR. Pass it directly as downstream input:

index_job = dxpy.DXApplet("applet-index").run(
    {"bam": reference},
    project="project-xxxx",
    folder="/runs/run-001/index",
    cost_limit=10,
)

The downstream job remains waiting_on_input until the upstream field resolves. If the upstream execution fails, the dependency fails rather than silently receiving a missing value.

Raw lines 237 to 269
270## Scatter/Gather with Subjobs
272```python
273import dxpy
276@dxpy.entry_point("main")
277def main(input_files):
278 children = [
279 dxpy.new_dxjob(
280 fn_input={"input_file": item},
281 fn_name="process",
282 )
283 for item in input_files
284 ]
286 gather = dxpy.new_dxjob(
287 fn_input={
288 "results": [
289 child.get_output_ref("result")
290 for child in children
291 ]
292 },
293 fn_name="gather",
294 )
295 return {"combined": gather.get_output_ref("combined")}
296```
298Avoid creating thousands of tiny subjobs. Current default account service
299limits include 100 running workers per user, and organizations can impose
300additional limits.

Scatter/Gather with Subjobs

import dxpy


@dxpy.entry_point("main")
def main(input_files):
    children = [
        dxpy.new_dxjob(
            fn_input={"input_file": item},
            fn_name="process",
        )
        for item in input_files
    ]

    gather = dxpy.new_dxjob(
        fn_input={
            "results": [
                child.get_output_ref("result")
                for child in children
            ]
        },
        fn_name="gather",
    )
    return {"combined": gather.get_output_ref("combined")}

Avoid creating thousands of tiny subjobs. Current default account service limits include 100 running workers per user, and organizations can impose additional limits.

Raw lines 270 to 301
302## Job Reuse
304DNAnexus can reuse prior successful jobs with equivalent executable, inputs,
305instance request, and other relevant settings.
307Reuse is desirable for deterministic workloads. Disable it only for a reviewed
308reason:
310```python
311job = applet.run(
312 inputs,
313 project="project-xxxx",
314 ignore_reuse=True,
315 cost_limit=25,
317```
319For workflows, `rerun_stages` or `ignore_reuse_stages` can target specific
320stages.
322Forced recomputation can multiply cost. Confirm it before using:
324```bash
325dx run --clone "analysis-xxxx" \
326 --rerun-stage "*" \
327 --destination "project-xxxx:/reruns/run-003"
328```
330Quote `"*"` so the shell does not expand it.

Job Reuse

DNAnexus can reuse prior successful jobs with equivalent executable, inputs, instance request, and other relevant settings.

Reuse is desirable for deterministic workloads. Disable it only for a reviewed reason:

job = applet.run(
    inputs,
    project="project-xxxx",
    ignore_reuse=True,
    cost_limit=25,
)

For workflows, rerun_stages or ignore_reuse_stages can target specific stages.

Forced recomputation can multiply cost. Confirm it before using:

dx run --clone "analysis-xxxx" \
  --rerun-stage "*" \
  --destination "project-xxxx:/reruns/run-003"

Quote "*" so the shell does not expand it.

Raw lines 302 to 331
332## Instance Selection
334Runtime override:
336```python
337job = applet.run(
338 inputs,
339 project="project-xxxx",
340 instance_type="mem2_ssd1_v2_x8",
341 cost_limit=25,
343```
345Workflow stages can use `stage_instance_types`.
347Prefer manifest-level policies for maintained apps. Runtime overrides are
348useful for diagnosis but reduce reproducibility and may change cost
349substantially.
351Dynamic instance selection uses an ordered
352`instanceTypeSelector.allowedInstanceTypes` list in the executable's system
353requirements. It is license-gated and mutually exclusive with a fixed instance
354or cluster for that entry point. Provisioning initially tries each allowed
355type for 10 minutes, then repeats the list with doubled windows.

Instance Selection

Runtime override:

job = applet.run(
    inputs,
    project="project-xxxx",
    instance_type="mem2_ssd1_v2_x8",
    cost_limit=25,
)

Workflow stages can use stage_instance_types.

Prefer manifest-level policies for maintained apps. Runtime overrides are useful for diagnosis but reduce reproducibility and may change cost substantially.

Dynamic instance selection uses an ordered instanceTypeSelector.allowedInstanceTypes list in the executable's system requirements. It is license-gated and mutually exclusive with a fixed instance or cluster for that entry point. Provisioning initially tries each allowed type for 10 minutes, then repeats the list with doubled windows.

Raw lines 332 to 356
357## Automatic Restarts
359Restartable failure reasons include:
361- `UnresponsiveWorker`
362- `ExecutionError`
363- `JMInternalError`
364- `AppInternalError`
365- `AppInsufficientResourceError`
366- `JobTimeoutExceeded`
367- `SpotInstanceInterruption`
369Do not blindly retry all failures. Input, output, and deterministic app errors
370normally require a fix.
372`executionPolicy.maxRestarts` caps total restarts across reasons. It must be a
373non-negative integer below 10 and defaults to 9; choose a smaller explicit
374bound to limit cost.
376For insufficient memory/disk, automatic instance upgrade requires the
377organization policy plus a `restartOn` count for
378`AppInsufficientResourceError` (or applicable wildcard). The platform upgrades
379within the same instance family until success, retry limit, or no larger
380instance.
382Use:
384```bash
385dx find executions --include-restarted
386dx watch "job-xxxx" --try 0
387```
389to inspect prior tries.

Automatic Restarts

Restartable failure reasons include:

  • UnresponsiveWorker
  • ExecutionError
  • JMInternalError
  • AppInternalError
  • AppInsufficientResourceError
  • JobTimeoutExceeded
  • SpotInstanceInterruption

Do not blindly retry all failures. Input, output, and deterministic app errors normally require a fix.

executionPolicy.maxRestarts caps total restarts across reasons. It must be a non-negative integer below 10 and defaults to 9; choose a smaller explicit bound to limit cost.

For insufficient memory/disk, automatic instance upgrade requires the organization policy plus a restartOn count for AppInsufficientResourceError (or applicable wildcard). The platform upgrades within the same instance family until success, retry limit, or no larger instance.

Use:

dx find executions --include-restarted
dx watch "job-xxxx" --try 0

to inspect prior tries.

Raw lines 357 to 390
391## Cost Controls
393`cost_limit` / `--cost-limit` terminates an execution when accumulated charges
394exceed the threshold. For a workflow, it applies to the entire analysis tree.
395It is separate from billing-account spending limits and licensed monthly
396project compute/egress limits; any one of these can stop or block work.
398Also control:
400- Destination and preserved intermediate outputs
401- Instance family/size
402- Priority and Spot/on-demand behavior
403- Timeout
404- Retry count
405- Reuse
406- Number of subjobs
407- Data egress
409A failed or terminated user job can still be billable. Current platform errors
410such as `InputError`, `OutputError`, `AppInternalError`,
411`CostLimitExceeded`, and `JobTimeoutExceeded` may incur charges.

Cost Controls

cost_limit / --cost-limit terminates an execution when accumulated charges exceed the threshold. For a workflow, it applies to the entire analysis tree. It is separate from billing-account spending limits and licensed monthly project compute/egress limits; any one of these can stop or block work.

Also control:

  • Destination and preserved intermediate outputs
  • Instance family/size
  • Priority and Spot/on-demand behavior
  • Timeout
  • Retry count
  • Reuse
  • Number of subjobs
  • Data egress

A failed or terminated user job can still be billable. Current platform errors such as InputError, OutputError, AppInternalError, CostLimitExceeded, and JobTimeoutExceeded may incur charges.

Raw lines 391 to 412
413## Failure Triage
415Describe a failed job:
417```bash
418dx describe "job-xxxx"
419dx watch "job-xxxx" --get-streams
420```
422Triage by `failureReason`:
424- `AppError`: expected input/data issue; follow app message
425- `AppInternalError`: application defect or nonzero command
426- `AppInsufficientResourceError`: memory/disk shortage
427- `AuthError`: expired/revoked root authorization
428- `CostLimitExceeded`: configured execution limit reached
429- `SpendingLimitExceeded`: billing account limit
430- `ExecutionError`: worker/platform/dependency setup issue
431- `IncompleteUploads`: one or more input uploads incomplete
432- `InputError`: invalid or unresolved input contract
433- `OutputError`: invalid/missing output contract
434- `JobTimeoutExceeded`: configured/platform runtime exceeded
435- `SpotInstanceInterruption`: Spot worker reclaimed
437Diagnosis sequence:
4391. Capture execution ID, try number, state, reason, and request ID.
4402. Inspect root and failing child in the execution tree.
4413. Check inputs are closed, live, and accessible.
4424. Check exact executable version and app metadata.
4435. Check instance metrics and disk/memory.
4446. Check dependency and network setup.
4457. Decide whether failure is deterministic or transient.
4468. Estimate rerun cost and obtain approval.
4479. Clone/rerun with only the justified changes.

Failure Triage

Describe a failed job:

dx describe "job-xxxx"
dx watch "job-xxxx" --get-streams

Triage by failureReason:

  • AppError: expected input/data issue; follow app message
  • AppInternalError: application defect or nonzero command
  • AppInsufficientResourceError: memory/disk shortage
  • AuthError: expired/revoked root authorization
  • CostLimitExceeded: configured execution limit reached
  • SpendingLimitExceeded: billing account limit
  • ExecutionError: worker/platform/dependency setup issue
  • IncompleteUploads: one or more input uploads incomplete
  • InputError: invalid or unresolved input contract
  • OutputError: invalid/missing output contract
  • JobTimeoutExceeded: configured/platform runtime exceeded
  • SpotInstanceInterruption: Spot worker reclaimed

Diagnosis sequence:

  1. Capture execution ID, try number, state, reason, and request ID.
  2. Inspect root and failing child in the execution tree.
  3. Check inputs are closed, live, and accessible.
  4. Check exact executable version and app metadata.
  5. Check instance metrics and disk/memory.
  6. Check dependency and network setup.
  7. Decide whether failure is deterministic or transient.
  8. Estimate rerun cost and obtain approval.
  9. Clone/rerun with only the justified changes.
Raw lines 413 to 448
449## Rerun
451CLI:
453```bash
454dx run "applet-xxxx" \
455 --clone "job-xxxx" \
456 --destination "project-xxxx:/reruns/run-004"
457```
459Arguments supplied with `--clone` override copied settings. Debug and SSH
460settings are not copied and should not be enabled casually.
462Do not rerun until:
464- Original cause is understood.
465- Input/output targets remain correct.
466- Reuse implications are understood.
467- New instance or dependency changes are documented.
468- Cost is approved.

Rerun

CLI:

dx run "applet-xxxx" \
  --clone "job-xxxx" \
  --destination "project-xxxx:/reruns/run-004"

Arguments supplied with --clone override copied settings. Debug and SSH settings are not copied and should not be enabled casually.

Do not rerun until:

  • Original cause is understood.
  • Input/output targets remain correct.
  • Reuse implications are understood.
  • New instance or dependency changes are documented.
  • Cost is approved.
Raw lines 449 to 469
470## Termination
472Termination is disruptive and billable work already performed is not refunded.
473Confirm exact ID and affected execution tree:
475```bash
476dx terminate "job-xxxx"
477dx terminate "analysis-xxxx"
478```
480`dx terminate` accepts both job and analysis IDs. For an analysis, confirm
481which stages and descendants remain active before terminating the tree.
483After termination, verify final states and identify incomplete outputs or open
484files that require cleanup.

Termination

Termination is disruptive and billable work already performed is not refunded. Confirm exact ID and affected execution tree:

dx terminate "job-xxxx"
dx terminate "analysis-xxxx"

dx terminate accepts both job and analysis IDs. For an analysis, confirm which stages and descendants remain active before terminating the tree.

After termination, verify final states and identify incomplete outputs or open files that require cleanup.

Raw lines 470 to 484