Skill Tracer
Skills › Scientific Agent Skills › pacsomatic › config-and-output.md

config-and-output.md

98 lines · skills/pacsomatic/references/config-and-output.md at 5f2bc03

Open on GitHub
1# Configuration and outputs
2

Configuration and outputs

Raw lines 1 to 2
3## Samplesheet and input scope
4
5The helper writes exactly two records with columns `patient,sample,status,bam,pbi`:
6normal `status=0`, tumor `status=1`; both share patient ID and have different sample
7IDs and BAM files. Paths are absolute or remote URIs. PBI is optional and blank
8when absent. PacBio PBI is not a coordinate BAI/CSI index. The pipeline aligns
9reads with pbmm2 and then generates coordinate indexes; a missing input BAI is
10not a defect for unaligned HiFi BAMs.
12The reviewed upstream schema also permits `.cram` and `.bai/.crai` in its broadly
13named `bam`/`pbi` fields. The usage docs describe unaligned PacBio BAM/PBI, and
14this helper deliberately validates that narrower path. It does not promise
15CRAM compatibility through the complete workflow. Upstream can handle multiple
16samples, but this helper generates one tumor and one normal only; additional
17samples require deliberate pairing review (upstream pairs by patient).

Samplesheet and input scope

The helper writes exactly two records with columns patient,sample,status,bam,pbi: normal status=0, tumor status=1; both share patient ID and have different sample IDs and BAM files. Paths are absolute or remote URIs. PBI is optional and blank when absent. PacBio PBI is not a coordinate BAI/CSI index. The pipeline aligns reads with pbmm2 and then generates coordinate indexes; a missing input BAI is not a defect for unaligned HiFi BAMs.

The reviewed upstream schema also permits .cram and .bai/.crai in its broadly named bam/pbi fields. The usage docs describe unaligned PacBio BAM/PBI, and this helper deliberately validates that narrower path. It does not promise CRAM compatibility through the complete workflow. Upstream can handle multiple samples, but this helper generates one tumor and one normal only; additional samples require deliberate pairing review (upstream pairs by patient).

Raw lines 3 to 18
19## Artifact and parameter controls
21| Option | Contract |
22| --- | --- |
23| `--pipeline-version` | Remote Nextflow `-r`; default reviewed commit for nf-core/pacsomatic |
24| `--repo-path` | Existing local pipeline containing main.nf; checkout/version control remains external; omit `--pipeline-version` |
25| `--checkout-dir` | Explicit opt-in clone; a new clone checks out the requested revision; an existing clone must already match |
26| `--params-file` | Existing local YAML/JSON for pipeline parameters; explicit helper input/outdir/reference wins |
27| `--nextflow-config` | Existing local Nextflow config for task executor/resources; forwarded as `-c` |
28| `--use-generated-params-file` | Use the generated YAML when no custom params file was supplied |
29| `--resume` | Reuse compatible cached tasks; requires retained `.nextflow` state and work files |
30| `--with-report`, `--with-dag` | Optional Nextflow report/DAG paths; choose supported formats (e.g. HTML) |
31| `--overwrite` | Replace reviewed helper artifacts; never allows input/artifact aliasing |
33Writes `<outdir>/samplesheet.csv`, `pacsomatic.params.generated.yaml` and
34`run_pacsomatic.<executor>.sh` (`none` uses `local`). Default work path is
35`<outdir>/work`. Generated YAML quotes string values. A custom params file is
36referenced, not copied or merged into the generated minimal YAML; retain it and
37its provenance too. Generated paths alone are not a complete run manifest.

Artifact and parameter controls

OptionContract
--pipeline-versionRemote Nextflow -r; default reviewed commit for nf-core/pacsomatic
--repo-pathExisting local pipeline containing main.nf; checkout/version control remains external; omit --pipeline-version
--checkout-dirExplicit opt-in clone; a new clone checks out the requested revision; an existing clone must already match
--params-fileExisting local YAML/JSON for pipeline parameters; explicit helper input/outdir/reference wins
--nextflow-configExisting local Nextflow config for task executor/resources; forwarded as -c
--use-generated-params-fileUse the generated YAML when no custom params file was supplied
--resumeReuse compatible cached tasks; requires retained .nextflow state and work files
--with-report, --with-dagOptional Nextflow report/DAG paths; choose supported formats (e.g. HTML)
--overwriteReplace reviewed helper artifacts; never allows input/artifact aliasing

Writes <outdir>/samplesheet.csv, pacsomatic.params.generated.yaml and run_pacsomatic.<executor>.sh (none uses local). Default work path is <outdir>/work. Generated YAML quotes string values. A custom params file is referenced, not copied or merged into the generated minimal YAML; retain it and its provenance too. Generated paths alone are not a complete run manifest.

Raw lines 19 to 38
39## Scheduler semantics
41`--executor` controls only how the **driver script** is launched:
43| Value | Submit command | Driver resource conventions |
44| --- | --- | --- |
45| `local`, `none` | `bash SCRIPT` | No allocation or resource enforcement |
46| `slurm` | `sbatch SCRIPT` | `--cpus-per-task`, total `--mem` MiB, `HH:MM:SS`; `%j` job ID in log names |
47| `lsf` | `bsub < SCRIPT` | `-n`, explicit `-M ...MB`, `-W HH:MM`; `%J` log names |
48| `pbs` | `qsub SCRIPT` | **PBS Pro/OpenPBS** `select=1:ncpus=...:mem=...mb`; not portable Torque syntax |
49| `sge` | `qsub SCRIPT` | `-pe smp` and per-slot `h_vmem` rounded upward in MiB |
51The helper's `--walltime` always means hours:minutes[:seconds]; minute/second
52fields must be below 60 and total time positive. LSF requires zero seconds.
53Resources must be positive and finite. PBS/SGE default logs are fixed
54`launcher.out`/`launcher.err`; choose unique names for simultaneous submissions.
55Log paths and scheduler directive fields use a conservative character set; no
56whitespace, shell expansions or embedded newlines are accepted.
58These are portable starting templates, not verified cluster allocations.
59Confirm site-specific LSF per-process/per-job `-M` interpretation and memory
60reservation policy, PBS resource names, and SGE `smp`/`h_vmem` configuration.
61A driver job must be allowed to submit tasks and remain alive until they finish.
62Set task resources and executor in a reviewed site profile/config, independently
63of the outer scheduler. If tasks run locally inside a driver allocation, enforce
64Nextflow executor capacity and per-process resource limits yourself.
66No HPC scheduler was contacted during skill testing. Tests mock submission argv,
67stdin, exit handling and job ID parsing (LSF/Slurm/PBS/SGE). Success from `sbatch`,
68`bsub` or `qsub` means acceptance, not successful scientific results.

Scheduler semantics

--executor controls only how the driver script is launched:

ValueSubmit commandDriver resource conventions
local, nonebash SCRIPTNo allocation or resource enforcement
slurmsbatch SCRIPT--cpus-per-task, total --mem MiB, HH:MM:SS; %j job ID in log names
lsfbsub < SCRIPT-n, explicit -M ...MB, -W HH:MM; %J log names
pbsqsub SCRIPTPBS Pro/OpenPBS select=1:ncpus=...:mem=...mb; not portable Torque syntax
sgeqsub SCRIPT-pe smp and per-slot h_vmem rounded upward in MiB

The helper's --walltime always means hours:minutes[:seconds]; minute/second fields must be below 60 and total time positive. LSF requires zero seconds. Resources must be positive and finite. PBS/SGE default logs are fixed launcher.out/launcher.err; choose unique names for simultaneous submissions. Log paths and scheduler directive fields use a conservative character set; no whitespace, shell expansions or embedded newlines are accepted.

These are portable starting templates, not verified cluster allocations. Confirm site-specific LSF per-process/per-job -M interpretation and memory reservation policy, PBS resource names, and SGE smp/h_vmem configuration. A driver job must be allowed to submit tasks and remain alive until they finish. Set task resources and executor in a reviewed site profile/config, independently of the outer scheduler. If tasks run locally inside a driver allocation, enforce Nextflow executor capacity and per-process resource limits yourself.

No HPC scheduler was contacted during skill testing. Tests mock submission argv, stdin, exit handling and job ID parsing (LSF/Slurm/PBS/SGE). Success from sbatch, bsub or qsub means acceptance, not successful scientific results.

Raw lines 39 to 69
70## Runtime checks
72`--use-current-path` uses installed tools. Otherwise the helper resolves the named
73Conda environment and prepends its `bin` for both checks and the generated script.
74`--create-conda-env` requires an explicitly supplied environment YAML and is
75unavailable in dry-run mode. `--module-load` accepts plain `module ...` commands
76only; preflight cannot evaluate cluster module initialization automatically.
78Preflight runs Nextflow `-version`, checks minimum 24.04.2, checks Java using
79`JAVA_CMD`/`JAVA_HOME`/PATH, and checks the selected runtime executable. A profile
80`singularity` requires `singularity`; `apptainer` requires `apptainer`. This does
81not test daemon permissions, containers, plugins, remote credentials, task
82execution or GPU compatibility. `--check-host-bio-tools` is an optional partial
83PATH inventory, not a complete dependency resolver; there is no upstream
84container profile named `local`.

Runtime checks

--use-current-path uses installed tools. Otherwise the helper resolves the named Conda environment and prepends its bin for both checks and the generated script. --create-conda-env requires an explicitly supplied environment YAML and is unavailable in dry-run mode. --module-load accepts plain module ... commands only; preflight cannot evaluate cluster module initialization automatically.

Preflight runs Nextflow -version, checks minimum 24.04.2, checks Java using JAVA_CMD/JAVA_HOME/PATH, and checks the selected runtime executable. A profile singularity requires singularity; apptainer requires apptainer. This does not test daemon permissions, containers, plugins, remote credentials, task execution or GPU compatibility. --check-host-bio-tools is an optional partial PATH inventory, not a complete dependency resolver; there is no upstream container profile named local.

Raw lines 70 to 85
86## Results and triage
88Upstream groups results under `alignment`, `germline_snv`, `somatic_snv`,
89`somatic_sv`, `somatic_cnv`, `methylation`, `tumor_clonality`, `signature_analysis`,
90`multiqc` and `pipeline_info`. Presence depends on enabled/successful branches.
91Do not interpret a missing branch as a negative biological finding.
93The pinned config uses timestamped execution report/timeline/trace filenames
94and a timestamped HTML DAG under `pipeline_info`; the generic website output
95page still shows some older DOT/SVG names. Inspect actual outputs, including
96`params.json`, `samplesheet.valid.csv`, software versions, run exit status and
97QC reports. Start failures at `<outdir>/.nextflow.log`, driver logs, then the
98failing work task's `.command.sh`, `.command.err`, `.command.out` and `.exitcode`.

Results and triage

Upstream groups results under alignment, germline_snv, somatic_snv, somatic_sv, somatic_cnv, methylation, tumor_clonality, signature_analysis, multiqc and pipeline_info. Presence depends on enabled/successful branches. Do not interpret a missing branch as a negative biological finding.

The pinned config uses timestamped execution report/timeline/trace filenames and a timestamped HTML DAG under pipeline_info; the generic website output page still shows some older DOT/SVG names. Inspect actual outputs, including params.json, samplesheet.valid.csv, software versions, run exit status and QC reports. Start failures at <outdir>/.nextflow.log, driver logs, then the failing work task's .command.sh, .command.err, .command.out and .exitcode.

Raw lines 86 to 98