Fragmentomics#
The frag command runs fragmentomics workflows. If no sub-workflow flag is
provided, CFTK attempts all configured fragmentomics analyses.
Install the fragmentomics Python dependencies before using this command:
python -m pip install ".[fragmentomics]"
cftk --config cftk_init.json frag
Sub-Workflows#
--occupancyRun DANPOS-style nucleosome occupancy analysis.
--wpsCompute window protection score features.
--delfiRun DELFI-style fragment ratio features through
finaletoolkit.--end-motifRun k-mer end motif analysis through
finaletoolkit.--cleavageRun CTCF cleavage analysis through
finaletoolkit.
Examples#
Run only WPS:
cftk --config cftk_init.json frag --wps
Run occupancy and DELFI:
cftk --config cftk_init.json frag --occupancy --delfi
Assay-Aware Scope#
The default Twist Human Methylome profile is targeted. In auto mode, CFTK
uses the covered-target BED to make panel-read BAMs for WPS, occupancy, and
DELFI, clips the WPS/occupancy region BED, and clips the DELFI bins. The
derived files and exact samtools commands are kept under
results/4_fragmentomics/_scope/<scope-id>/ and recorded in the command
ledger. These are panel-restricted features and must not be interpreted as
genome-wide WPS, occupancy, or the original genome-wide DELFI score.
Each scoped output directory also contains
fragmentomics_scope.json. It is the beginner-facing record of the resolved
mode, target BED and checksum, clipped interval counts, input signatures, and
the interpretation warning:
python -m json.tool results/4_fragmentomics/wps/fragmentomics_scope.json
The command prints the same scope note before running. The historical DELFI
figure filename contains _genome for compatibility; its title includes the
resolved scope and it must not be read as proof of genome-wide coverage.
Inspect the resolved choice before running:
cftk --config cftk_init.json plan --preset fragmentomics
cftk --config cftk_init.json analyze --preset fragmentomics --dry-run
For a custom targeted profile, select panel scope explicitly. For a validated whole-genome project, the advanced override is explicit and appears in the provenance manifest:
cftk --config cftk_init.json frag --wps --fragmentomics-scope panel
cftk --config cftk_init.json analyze --preset fragmentomics \
--fragmentomics-scope genome
End-motif and cleavage commands retain their existing inputs; the automatic panel restriction described here applies specifically to WPS, occupancy, and DELFI.
Reference Inputs#
Fragmentomics workflows use different reference files:
chrom_sizesfor genomic intervals and bigWig/binned workflows.genome_2bitfor DELFI and some finaletoolkit commands.tss_pas_bedfor WPS and occupancy regions.ctcf_bedfor cleavage.blacklist,gap, andbinsfor DELFI-style features.
Outputs are written under:
<output_dir>/results/4_fragmentomics/
Expected Outputs#
The sub-workflows have different primary artifacts. A matrix is created for occupancy and WPS when more than one sample is available; use the merge command for modalities that return per-sample tables.
Sub-workflow |
Primary files |
Directory |
|---|---|---|
occupancy |
|
|
WPS |
|
|
DELFI |
|
|
end motif |
|
|
cleavage |
|
|
cftk vis --mode frag writes PNG/PDF summaries beside these directories,
including occupancy, DELFI, end-motif, cleavage, and comparison plots when
the corresponding inputs exist. The figure below is a real five-control/
five-sALS technical example. It includes the completed occupancy, WPS, DELFI,
and end-motif outputs and explicitly marks cleavage as not run.
Observed output from five controls and five sALS samples. WPS,
occupancy, and DELFI are restricted to reads and intervals overlapping the
configured Twist target panel, so these are panel-overlap summaries rather
than genome-wide measurements or the original genome-wide DELFI score. The
run did not produce cleavage output. These are technical workflow outputs,
not biological or clinical validation. The per-sample tables, matrices, and
scope sidecars listed above are authoritative. Download the sanitized
aggregate metadata:
JSON.#