Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
69794ff
updated nextflow and commented on changes
dhspence Aug 14, 2025
23a3c39
fixed lsf config and WF plumbing
dhspence Dec 24, 2025
2f55cc7
updated find indels script
dhspence Jan 8, 2026
d8b4a8d
updated indel/bnd file format
dhspence Jan 8, 2026
4941c63
updated outputs
dhspence Jan 9, 2026
13487ba
fixed bug when no indels found
dhspence Jan 12, 2026
92f9f5e
fixed find edited reads when there are no reads
dhspence Jan 12, 2026
79dfcea
fixed find edited reads when there are no reads
dhspence Jan 12, 2026
b5d2763
updated vcf output
dhspence Jan 12, 2026
9ec5786
fixed type error
dhspence Jan 12, 2026
40c2354
added symbolic alt for large indels
dhspence Jan 16, 2026
fabb143
updated fastq_list input
dhspence Jan 24, 2026
3de3333
fixed target file plumbing
dhspence Jan 24, 2026
db4c3cc
fixed hotspot vcf sort order
dhspence Jan 24, 2026
545b027
fixed merging tumor/normal
dhspence Jan 26, 2026
be069a5
Added a new script to generate Excel reports, and modified report gen…
Bonney96 Jan 27, 2026
936eb4b
Merge branch 'dev' into dhsdev
Bonney96 Jan 27, 2026
6e5b425
Summary: Fixed a crash when analyzing target sites near the start of …
Bonney96 Feb 3, 2026
85f269a
merged
dhspence Feb 20, 2026
e5456d6
Merge pull request #10 from dhslab/dhsev2
dhspence Feb 20, 2026
24dc6ff
fixed bug that aggregated results for all sites in the same loop
dhspence Feb 25, 2026
079deca
Merge pull request #11 from dhslab/dhsev2
dhspence Feb 25, 2026
0587b5e
Fix per-interval indel accumulation bug and negative coordinate in ad…
Bonney96 Mar 13, 2026
991dd5a
Add Unified CRISPR Off-Target Workflow (-entry OFFTARGET)
Bonney96 Jul 9, 2026
7b5d4b2
Add off-target glue-script pytest suite; rewrite README
Bonney96 Jul 9, 2026
7bbed7f
Add nf-metro metro-map diagram for the off-target workflow
Bonney96 Jul 9, 2026
c46e083
docs: animated metro maps for SCGE + off-target workflows; refresh RE…
Bonney96 Jul 10, 2026
b3a2e23
docs: revert SCGE map to static DAG; tidy off-target metro
Bonney96 Jul 10, 2026
2e9ebe2
offtarget: sklearn version guard + pin docker-scge-offtarget image
Bonney96 Jul 10, 2026
94ec560
docs: scope the OFFTARGET workflow honestly against the validation data
Bonney96 Jul 10, 2026
72c6326
formatting
Bonney96 Jul 10, 2026
fa99579
formatting 2
Bonney96 Jul 10, 2026
c4ff947
offtarget: container-first test harness (run_offtarget_tests.sh)
Bonney96 Jul 21, 2026
b8df5fb
offtarget: production-harden the SLURM+Apptainer path, mode gating, j…
Bonney96 Jul 21, 2026
5854fbd
offtarget: somatic (germline-excluded) training label
Bonney96 Jul 21, 2026
8ac5731
offtarget docs: SLURM+Apptainer run path, somatic label, honest valid…
Bonney96 Jul 21, 2026
c8c47dc
offtarget: verification snapshots docs, CART wrapper, CI pin
Bonney96 Jul 21, 2026
b1b3dc3
offtarget: stop ECS_INDELS multi-TB debug log; harden run against clu…
Bonney96 Jul 22, 2026
d286de2
offtarget: lighten resources, harden inputs, and consolidate the runner
Bonney96 Jul 23, 2026
ae92476
cleanup: drop deprecated CRISPR-ML scripts, document the DRAGEN-free …
Bonney96 Jul 23, 2026
8a661e5
README: correct the container table and fill the off-target ML image
Bonney96 Jul 23, 2026
bf5f869
offtarget: add -entry TRAIN offline shape-model trainer
Bonney96 Jul 23, 2026
dfc0083
nf-core update
Bonney96 Jul 24, 2026
254c931
auto-hotspot feature
Bonney96 Jul 24, 2026
60e017d
CAS-OFFINDER updates
Bonney96 Jul 27, 2026
00e7abd
Optimized for 100% recall based on manual reviewed cohort
Bonney96 Jul 28, 2026
e771a13
comment changes
Bonney96 Jul 28, 2026
f778596
offtarget: PR-AUC and recall-weighted F-beta (F2/F5) as pipeline outputs
Bonney96 Jul 28, 2026
6d4afd7
Merge pull request #14 from dhslab/feat/offtarget-prauc-metrics
Bonney96 Jul 28, 2026
4ef7a17
offtarget CI: install scikit-learn; skip the gitignored target_file s…
Bonney96 Jul 28, 2026
85c1304
stub: null out refdir so stub runs work without the /storage2 DRAGEN …
Bonney96 Jul 28, 2026
f66ab1b
Merge pull request #15 from dhslab/feat/offtarget-prauc-metrics
Bonney96 Jul 28, 2026
d112dfd
offtarget: wire OFFTARGET_METRICS into the workflow; make stub runs w…
Bonney96 Jul 28, 2026
42c5339
offtarget: optional per-read XC tags on a target-window BAM for IGV r…
Bonney96 Jul 28, 2026
09fe22b
Merge pull request #16 from dhslab/feat/offtarget-prauc-metrics
Bonney96 Jul 28, 2026
8124591
Merge branch 'feat/offtarget-wgs' into worktree-read-level-bam-tags
Bonney96 Jul 28, 2026
e6b5a8d
Merge pull request #17 from dhslab/worktree-read-level-bam-tags
Bonney96 Jul 28, 2026
007bd07
recall_vs_vaf: make the figure state the denominator it actually used
Bonney96 Jul 28, 2026
ec163bc
gitignore: exclude .claude/
Bonney96 Jul 28, 2026
7ff0403
offtarget_demo prep
Bonney96 Jul 29, 2026
617d1f5
crispr review queue update
Bonney96 Jul 31, 2026
e9b81b9
Off-target CRISPR edit finder update
Bonney96 Aug 7, 2026
137a7c3
find_edited_reads: report control support for breakends, fix BND posi…
Bonney96 Aug 11, 2026
918b833
review filter: lower the gate, add systematic-noise rule, triage brea…
Bonney96 Aug 11, 2026
8d2dc3d
ris2: retry sbatch submission failures instead of aborting the run
Bonney96 Aug 13, 2026
7672d33
review filter: replace the boolean PoN with a beta-binomial noise model
Bonney96 Aug 13, 2026
db004c5
review filter: consume caller annotations, and stop re-reading the 1 …
Bonney96 Aug 13, 2026
f560c24
one cut-distance threshold in the caller; retire the panel of normals
Bonney96 Aug 13, 2026
830aab9
remove the panel of normals
Bonney96 Aug 13, 2026
65076b9
nextflow.config: correct review-block comments left stale by the PoN …
Bonney96 Aug 13, 2026
8e91adf
docs: sync with the PoN removal
Bonney96 Aug 13, 2026
661d15c
docs: record why rule 1 survives the noise model
Bonney96 Aug 13, 2026
311e929
Complete the breakend arm: fix the SV VCF, add junction snapshots and…
Bonney96 Aug 18, 2026
ea381af
Document and validate the background noise model; measure the panels …
Bonney96 Aug 18, 2026
0962f3d
Regenerate the calibration QQ plot from the paired-draw code
Bonney96 Aug 18, 2026
5e2a077
Score the SNV panel against both truth populations, and say which is …
Bonney96 Aug 18, 2026
e696915
BND finishing touches
Bonney96 Aug 20, 2026
0c913c6
systematic noise testing
Bonney96 Aug 20, 2026
a77726d
handoff docs for off-target
Bonney96 Aug 21, 2026
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
version: "${{ matrix.NXF_VER }}"

- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
# The bundled assets/stub/ inputs are truncated placeholders, not real data, so this
# is a DAG/wiring check via each module's stub block rather than a data test.
# -entry OFFTARGET and -entry TRAIN are covered separately by offtarget-ci.yml.
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
nextflow run ${GITHUB_WORKSPACE} -profile test,docker -stub-run --outdir ./results
148 changes: 148 additions & 0 deletions .github/workflows/offtarget-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: offtarget CI
# Exercises the -entry OFFTARGET workflow that the default nf-core CI does not cover:
# 1. stub run — DAG wiring for all three modes (paired / wgs_only / ecs_only)
# 2. glue tests — the ECS<->WGS join logic (tests/test_offtarget_glue.py)
# 3. nf-test — REAL process bodies in the real container, on KB-sized fixtures
#
# (1) and (3) are complementary and neither replaces the other: a stub run only `touch`es
# outputs, so it proves the DAG connects but executes no line of bin/*.py; nf-test runs the
# actual command, so it catches a module passing a flag the script does not accept.
on:
push:
branches:
- dev
- "feat/offtarget-**"
pull_request:
paths:
- "workflows/offtarget.nf"
- "subworkflows/local/**"
- "modules/local/**"
- "bin/**"
- "tests/**"
- "conf/stub.config"
- "nf-test.config"
- "assets/offtarget_samplesheet_template.csv"
- ".github/workflows/offtarget-ci.yml"

env:
NXF_ANSI_LOG: false

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

jobs:
stub:
name: OFFTARGET stub run (DAG wiring, all modes)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
# pin a stable release: the repo config's check_max() doesn't parse under the
# 26.x edge that "latest-everything" now resolves to.
version: "25.10.4"

# stub blocks only `touch` their outputs, so no container/data is needed — this is a
# pure wiring check. Derive single-arm sheets from the template to hit every mode.
- name: Build per-mode samplesheets
run: |
SS=assets/offtarget_samplesheet_template.csv
head -1 "$SS" | tee ss_wgs.csv > ss_ecs.csv
grep -iE ',wgs,' "$SS" >> ss_wgs.csv
grep -iE ',ecs,' "$SS" >> ss_ecs.csv

- name: Stub run — paired
run: nextflow run . -entry OFFTARGET -profile stub -stub-run --input "$SS" --outdir out_paired
env:
SS: assets/offtarget_samplesheet_template.csv
- name: Stub run — wgs_only
run: nextflow run . -entry OFFTARGET -profile stub -stub-run --input ss_wgs.csv --outdir out_wgs
- name: Stub run — ecs_only
run: nextflow run . -entry OFFTARGET -profile stub -stub-run --input ss_ecs.csv --outdir out_ecs
# ecs rows with a spacer but no target_file auto-generate the hotspot VCF (once per guide)
- name: Stub run — ecs target_file auto-wire from spacer
run: |
nextflow run . -entry OFFTARGET -profile stub -stub-run \
--input assets/stub/offtarget_autowire.csv --fasta assets/stub/tiny.fa --outdir out_autowire

hotspots-stub:
name: HOTSPOTS stub run (gRNA -> targets DAG wiring)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "25.10.4"

# stub blocks only `touch`/`printf` their outputs, so no container/genome is needed.
# Point --fasta at the tiny committed fixture (the real /storage2 reference is absent on CI).
- name: Stub run — Cas-OFFinder only (default)
run: |
nextflow run . -entry HOTSPOTS -profile stub -stub-run \
--input assets/grna_samplesheet_template.csv \
--fasta assets/stub/tiny.fa --outdir out_hotspots
- name: Stub run — with CRISPRme enabled
run: |
mkdir -p crisprme_idx
nextflow run . -entry HOTSPOTS -profile stub -stub-run \
--input assets/grna_samplesheet_template.csv \
--fasta assets/stub/tiny.fa --run_crisprme --crisprme_index_dir crisprme_idx \
--outdir out_hotspots_cme

glue-tests:
name: OFFTARGET glue-logic + combiner unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

# the glue scripts are pure-pandas; a clean checkout has no repo-root vendored dirs to shadow.
# scikit-learn is needed by bin/offtarget_metrics.py (PR-AUC / ROC-AUC); the
# off-target container pins 1.8.0, but here any recent version is fine since
# nothing unpickles a model in these tests.
- name: Install test deps
run: python -m pip install --quiet pandas matplotlib pytest openpyxl scikit-learn

- name: Run glue + combiner tests
run: python -m pytest -q tests/test_offtarget_glue.py tests/test_combine_offtarget.py

nf-test:
name: nf-test (real process bodies, real container)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "25.10.4"

# Installed straight from the vendor rather than via an action, so this step does
# not depend on a third-party action's input schema. The trailing argument pins
# the version; drop it to track latest (not recommended for a reproducible CI).
- name: Install nf-test
run: |
curl -fsSL https://code.askimed.com/install/nf-test | bash -s 0.9.5
sudo mv nf-test /usr/local/bin/
nf-test version

# ghcr.io/dhslab/docker-scge-offtarget is publicly readable, so no login is needed.
# Pull it up front: a first-use pull inside a process makes a timeout look like a
# test failure, and the image is shared by every test here.
- name: Pre-pull the off-target container
run: docker pull ghcr.io/dhslab/docker-scge-offtarget:260710

# Fixtures are ~6 KB (tests/fixtures/), so this is a couple of minutes on a 2-CPU
# runner. `stub` supplies the params profile — it nulls the /storage2 DRAGEN paths
# that workflows/scge.nf validates at parse time — while `docker` supplies the
# engine. Neither implies -stub-run; the process bodies really execute.
- name: Run nf-test
run: nf-test test --profile stub,docker --verbose
109 changes: 106 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,112 @@
# =============================================================================
# nf-core-scge — .gitignore
# Pattern-based. Root-anchored (leading /) entries are one-off local files that
# are intentionally kept out of git; delete or commit them deliberately.
# =============================================================================

# ---- Agent / tooling scratch ----
# Claude Code keeps per-repo settings AND full worktree checkouts under .claude/
# (each with its own .nextflow logs and work dirs) — hundreds of MB that must never
# be swept into a commit by `git add -A`.
.claude/

# ---- nf-test ----
# nf-test writes a per-test scratch .nf file into the REPO ROOT (one per test id) and
# keeps its work dir in .nf-test/. Both are build artifacts of a test run, and there
# are ~100 of the scratch files after a full suite.
.nf-test/
.nf-test-*.nf
.nf-test.log

# ---- Nextflow runtime ----
.nextflow*
work/
data/
results/
.DS_Store
results*/
null/
nxf-tmp.*

# ---- Data & large / generated inputs ----
data/
logs/
testing/
testing*
mastersheets/
test_output/
test_results*
test_logs/
test_mastersheets/
test_null/

# ---- Python (vendored envs, caches, build metadata) ----
__pycache__/
*.pyc
.dir_bash_history
*.dist-info/
*.libs/
.pytest_cache/
# local test venv/cache created by run_offtarget_tests.sh
.offtarget_testenv*/
.offtarget_testcache/

# ---- Scheduler / process logs ----
*.log
*.err

# ---- OS / editor ----
.DS_Store
/.dir_bash_history

# ---- Local-only files: not part of the pipeline ----
/CLAUDE.md
/REPO_INVENTORY.md
/DEBUGGING_REPORT.md
/to_commit.md
/pipeline_explanation.txt
/Groovy vs. Shell in Nextflow.txt
/minimal.config
/flowchart.dot
/extracted_indels.json
/versions.yml
/build.sh
/nextflow
/-e
/s
/err.txt
/AAVS1site14_WTcas9-DNA.scge_report_ml.html
/AAVS1site14_WTcas9-DNA.scge_report_og.html
/analysis_samples.csv
/mastersheet.*.csv
/offtarget_samplesheet_aavs1.csv
/mock_dragen_dir/
/aavs1_ml_testing/
/training_data/
/run.sh
/run_all.sh
/run_test.sh
/run_offtarget_aavs1.sh
/test_syntax.nf
/test_versions.nf

# ---- Legacy CRISPR-ML scripts / models (deprecated; see REPO_INVENTORY.md) ----
bin/*.bak
bin/build_from_curated_tsv.py
bin/build_training_from_tsv.py
bin/convert_targets.pl
bin/train_aavs1_v3.sh
bin/train_aavs1_v3_lsf.sh
bin/tsv_to_vcf.py
assets/NO_*.csv
assets/NO_*.tsv
assets/empty*.txt
assets/all_samples_mastersheet.csv
assets/ecs_samples_mastersheet.csv
assets/models/crispr_model_*.pkl
assets/models/crispr_model_*_cv_summary.csv
assets/stub/AAVS1_site14.targets.csv
assets/stub/aavs1site14_samplesheet.csv

# ---- nf-core plugin cache ----
subworkflows/nf-core/utils_nfschema_plugin/

# ---- Large committed-doc screenshots ----
docs/images/Screenshot*.png
Loading
Loading