Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
420 commits
Select commit Hold shift + click to select a range
67f88f8
Look for resources locally first, then fetch from S3 if necessary
stefinfection Nov 2, 2025
a3c49dc
Update singularity container image variable to docker image one
stefinfection Nov 2, 2025
d1ffa12
Make env file argument mandatory; use docker resources script via S3 …
stefinfection Nov 2, 2025
3e3f76e
split region worker from launch script because parallel doesn't inher…
stefinfection Nov 2, 2025
57b90d3
launch script delete whooops
stefinfection Nov 2, 2025
7b1ee2c
lowercase docker container name
stefinfection Nov 2, 2025
9857a0c
lowercase rufus in docker image pull; add no sign request option to s…
stefinfection Nov 2, 2025
923d3af
use aws cp instead of sync for hash files
stefinfection Nov 2, 2025
598308e
Update variable name in download script
stefinfection Nov 2, 2025
3c79f09
missing var marker
stefinfection Nov 2, 2025
ec2cf7c
more testing
stefinfection Nov 3, 2025
db08cb7
Update reference arg to use cr for cram inputs
stefinfection Nov 3, 2025
80f7d7a
Merge remote-tracking branch 'origin/chpc_stage' into singularity_eps…
stefinfection Nov 3, 2025
9f74e37
extract ref_cat argument after cramref transfer to ref
stefinfection Nov 3, 2025
2a5e8d0
remove gcc check; hardcode RDIR in scripts to dir mount; add optional…
stefinfection Nov 3, 2025
c60ed89
remove primate files
stefinfection Nov 3, 2025
55bbb1a
fix error code exiting for empty hash checks
stefinfection Nov 3, 2025
6de1bfb
turns out those primate files are used
stefinfection Nov 3, 2025
480cd7c
correct logic for looking for existing hash tables
stefinfection Nov 3, 2025
c246b66
all samtools pointed internally; change argument order to allow for n…
stefinfection Nov 3, 2025
8bbcf79
clean up files working; pass rufus dir to overlap script
stefinfection Nov 3, 2025
5fbcade
add back in clean up hash files + remove sudos and test mount
stefinfection Nov 3, 2025
1032911
organize docker files
stefinfection Nov 3, 2025
39cafc6
Update README.md
stefinfection Nov 3, 2025
10334b2
working entire chromosome version; logs going to /mnt/rufus_resources…
stefinfection Nov 3, 2025
ea556f2
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
stefinfection Nov 3, 2025
5fb183f
first stab at post process update if no controls
stefinfection Nov 4, 2025
113480b
rename rufus out file to work with post-process; add region to rufus_…
stefinfection Nov 4, 2025
43c2120
post processing progress; make remove gx empty script work with any n…
stefinfection Nov 4, 2025
b5668ae
update env to run in parallel; account for no controls in post proces…
stefinfection Nov 4, 2025
82ef409
remove redundant chrom vcf line; update sample string for single samp…
stefinfection Nov 4, 2025
7d8cd73
have final vcf being made with intermediate files correctly deleting;…
stefinfection Nov 5, 2025
e54f982
Clarify soft linking usage in RUFUS data directory
stefinfection Nov 5, 2025
3bcd838
VERSION 1.0.0 - outputting rufus command invocation to vcf correctly
stefinfection Nov 5, 2025
922b1ea
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
stefinfection Nov 5, 2025
f65baa8
Fix formatting issue in README.md
stefinfection Nov 5, 2025
e5b1fdf
Update download links in README for scripts and files
stefinfection Nov 6, 2025
5bfb005
Correct links for zenodo
stefinfection Nov 6, 2025
4b1b4b8
don't hard code image or mnt dir! duh
stefinfection Nov 6, 2025
de79ff9
Update download links from Zenodo to S3
stefinfection Nov 6, 2025
e519214
Sync branch
stefinfection Nov 11, 2025
6bed639
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
stefinfection Nov 11, 2025
e07a066
Don't enforce files in a single directory to provide goofy compatibil…
stefinfection Nov 12, 2025
11c047e
Checkpoint before starting testing
stefinfection Nov 12, 2025
f9fdacb
Reorganize env file; add a couple more env input checks to launch script
stefinfection Nov 12, 2025
b777f6f
Update controls to control_file_array
stefinfection Nov 12, 2025
2da91ce
Update readme
stefinfection Nov 13, 2025
962e06f
Keep bwa indexes if we have to build them and leave readme in out dir…
stefinfection Nov 13, 2025
cbda002
update env file references relative to in/out container
stefinfection Nov 13, 2025
92704fc
pull out worker script from container and copy to workspace for execu…
stefinfection Nov 13, 2025
ab27c1f
Update readmes
stefinfection Nov 13, 2025
eb1ac0f
Check for realpath on all file and dirs
stefinfection Nov 13, 2025
4725cfd
back to realpaths and simplify ref function + todos
stefinfection Nov 13, 2025
7558fd0
Create temp env file with absolute paths to pass to process_region_wo…
stefinfection Nov 13, 2025
6420b15
move around setting working dir so we can write a temp env file with …
stefinfection Nov 13, 2025
4fb93e8
trailing slash
stefinfection Nov 13, 2025
ba1ac60
remove chromosome sub-dir in download_hash
stefinfection Nov 13, 2025
ada18f4
Don't think we need the env file mounted
stefinfection Nov 13, 2025
7d19463
add index checks for bams and crams; set kmer length to 25 in temp en…
stefinfection Nov 14, 2025
59dcc94
fix paths in region worker
stefinfection Nov 14, 2025
4a0a52f
match working version
stefinfection Nov 14, 2025
4c42cb0
spacing mistake for run mounts; keep ref clause even if we have to bu…
stefinfection Nov 14, 2025
cc28867
use correct ref path
stefinfection Nov 14, 2025
6c85f3a
debugging progress
Nov 14, 2025
09b9076
working post p
Nov 14, 2025
40698e4
switch to supplementals instead of resources; correct post p cleanup
stefinfection Nov 14, 2025
57736e6
Compartmentalize cleanup within container; more robust checking for h…
stefinfection Nov 14, 2025
c7803cc
Clean outputs; working for both local and remote hashes
stefinfection Nov 15, 2025
6b68605
Don't need container cleanup
stefinfection Nov 15, 2025
849315d
remove dev mount
stefinfection Nov 15, 2025
b774c08
Remove redundant launch file so we don't get confused; update readme
stefinfection Nov 15, 2025
a21c0c4
Copy over readme
stefinfection Nov 15, 2025
7b1e164
Add processing output per region
stefinfection Nov 15, 2025
f82b995
samtools pointing to container location
stefinfection Nov 30, 2025
bcf5eb1
remove gcc check
stefinfection Nov 30, 2025
6acb30c
erroneous ;
stefinfection Nov 30, 2025
0173658
ignore sifs
stefinfection Nov 30, 2025
9b5c199
get rid of repeat if statement
stefinfection Dec 1, 2025
2954e8e
vcf header fixes
stefinfection Dec 1, 2025
c1321f7
vcf rufus command fix
stefinfection Dec 1, 2025
2b4e698
update vcf header out
stefinfection Dec 11, 2025
35611da
strip off region postfix from vcf sample names
stefinfection Dec 12, 2025
4d21af1
brackets
stefinfection Dec 12, 2025
05cc9b0
remove redundant version echo
stefinfection Dec 12, 2025
9285701
spacing
stefinfection Dec 12, 2025
36ca118
Update trim and combine to work with multiple controls; remove prefil…
Dec 13, 2025
61d18c4
fix rufus_cmd file deletion bug that was bricking cleanup
Dec 15, 2025
e18397b
update arg parser to work with multiple controls
Dec 15, 2025
d6f5272
add quotes to prevent globbing; fix regionPostfix argument in clean_u…
Dec 16, 2025
43d16a4
version update
stefinfection Dec 16, 2025
c193c2b
remove debug exit + leftoff comment
stefinfection Dec 16, 2025
6eacb58
Remove all absolute paths for tools; update docker def to put general…
stefinfection Dec 18, 2025
288c15c
Fix hard coded overlap depth of 5
Dec 18, 2025
5b6f61b
debug exit
Dec 18, 2025
b83792b
Merge branch 'singularity_delta' of github.com:stefinfection/RUFUS in…
Dec 18, 2025
bcd6f84
fix done keyword on newline in rufus_call slurm script
Dec 18, 2025
99ad14c
Add mem_per_job and cpus_per_job parameters in setup_slurm script for…
Dec 18, 2025
96df3af
left off notes + RUFUS_ROOT echo
stefinfection Dec 18, 2025
d1a1d7a
trap file cleanup instead of explicitly calling
Dec 19, 2025
d993eaf
Merge branch 'singularity_delta' of github.com:stefinfection/RUFUS in…
Dec 19, 2025
eb9831c
Added post-process cleanup trap; made remove_coinheriteds compatible …
Dec 20, 2025
1778253
set defaults for cpu/mem variables if empty; fix for loop bug in setu…
Dec 20, 2025
98cbada
move static defaults to arg_parser instead of setup_slurm so don't ha…
Dec 20, 2025
e6d5b80
switch file removal to find
Dec 20, 2025
ee871db
edit finds so we don't delete the temp final vcf per region
Dec 20, 2025
17eb621
line break at end of loop in setup
Dec 20, 2025
0cd1913
for loop setup new line fix; fix command txt name
Dec 20, 2025
0b62340
fix default setting for cpus/mem/threads
Dec 20, 2025
334bab5
Update empty assembly result to non-error exit code
Dec 20, 2025
1d25255
switch from tbi to csi; clean up post process with find for temp regi…
Dec 20, 2025
7748400
update arg checking; correct file deletion retaining final vcf; safeg…
Dec 21, 2025
add363e
Safeguard against premature clean up exit if no final vcf (e.g. when …
Dec 22, 2025
8c28cd5
make mnt dir in def file - singularity does not make NE directories l…
Dec 29, 2025
65a4785
fix post interpret vcf
Jan 16, 2026
e898f72
temp final vcf post calling stage correctly reporting variants; corre…
Jan 16, 2026
809f607
Remove debugs; move /mnt dir creation to container def file
Jan 17, 2026
339a063
remove change wd to def file
Jan 17, 2026
4e7b903
Have to go to /mnt in main script
Jan 17, 2026
b79a05d
add specific tag to def file
stefinfection Jan 17, 2026
079d15b
Merge branch 'singularity' of github.com:stefinfection/RUFUS into sin…
stefinfection Jan 17, 2026
815d96f
Update zenodo link
Jan 18, 2026
2ba025c
removing cmd file
stefinfection Jan 23, 2026
d8bee08
fixed old jellyfish macro syntax/autotools building error
stefinfection Jan 24, 2026
9761c97
fix rufus version/command line injection into vcf; start updating lau…
stefinfection Jan 24, 2026
330d7d1
remove redundant echo
stefinfection Jan 26, 2026
562ee5f
Don't call write_command_args.sh because this needs to be coordinated…
stefinfection Jan 26, 2026
c10516d
Don't make aws cp to a specific temp directory to comply with CWL
stefinfection Jan 26, 2026
0ea0e89
Update version
stefinfection Jan 26, 2026
8d4fc45
Update file name to match runRufus write
stefinfection Jan 26, 2026
ff9e451
runRufus points to pwd unless in another env var
stefinfection Jan 26, 2026
c928af0
make /work working dir in container
stefinfection Jan 26, 2026
09b8d62
pass command file path to rufus interpret directly
stefinfection Jan 26, 2026
4f329f2
samtools, bcftools, bamtools, bedtools make install
stefinfection Jan 26, 2026
33c5105
comment out dev mount for testing; update Dockerfile to pull correct …
stefinfection Jan 27, 2026
df1cb92
Don't build jellyfish twice, also build a modifiedJellyfish!
stefinfection Jan 27, 2026
6959f03
Fully revert jellyfish cmake files
stefinfection Jan 27, 2026
5e2363d
Fixed modifiedJelly binary pointer
stefinfection Jan 27, 2026
85d1fea
Fix prefix parsing in rufus interpret for invoc file arg
stefinfection Jan 27, 2026
52add2a
Copied over file cleaning trap from singularity branch
stefinfection Jan 28, 2026
f31508e
Get rid of path in sample name for vcf header
stefinfection Jan 28, 2026
0ce3671
Fix extra space between header + varaints in interpret vcf
stefinfection Jan 28, 2026
604ca41
Lower pileup depth from 500->100; add post-processing to main script;…
stefinfection Jan 29, 2026
d2621a7
Remove region postfix so concat will work cleanly; fix remove_empty_g…
stefinfection Jan 29, 2026
ebae003
Post call formatting + processing complete w/ intermediate files bein…
stefinfection Jan 29, 2026
598df6b
Update RUFUS interpret to include contigs in header; add -h parameter…
stefinfection Jan 30, 2026
818bdd8
Update sam header parsing in interpret
stefinfection Jan 30, 2026
78f6a3f
build update script
stefinfection Jan 30, 2026
db79c23
Remove rufus_temp region specific files in cleanup
stefinfection Jan 30, 2026
19da09d
Remove bam output check in overlap
stefinfection Jan 30, 2026
7a3b4db
Clean up old, broken header/contig parsing
stefinfection Jan 30, 2026
2a4cb4b
Test suite fully functional, added in vcf results
stefinfection Jan 31, 2026
acc7a7c
remove intermediates
stefinfection Jan 31, 2026
de0f387
Add formatted region to temp cleanup vcfs
stefinfection Feb 2, 2026
414e9d3
Merge branch 'docker' into singularity
stefinfection Feb 2, 2026
0b8488c
Update post process to be simple concatenation + sorting like docker …
stefinfection Feb 2, 2026
4cbe3e8
Run coinherited script is called in main runRufus.sh script if we hav…
stefinfection Feb 2, 2026
8d1d61a
Make entire run go in a region specific or WG directory; update threa…
stefinfection Feb 4, 2026
1143bc8
Added absolute paths everywhere + export WORK_DIR to all downstream s…
stefinfection Feb 4, 2026
78cf186
missing closure runRufus.sh
stefinfection Feb 4, 2026
dd0b46e
More relative to absolute paths in runRufus; make fifo arg passing cl…
stefinfection Feb 4, 2026
9188fd4
Get rid of blocking FIFO_MAIN pipe
stefinfection Feb 4, 2026
e97174f
Fix fifo wrapped in fifo deadlock
stefinfection Feb 4, 2026
6b85c2c
Move final temp.vcf to correct work_root path
stefinfection Feb 4, 2026
c498994
Update Dockerfile versioning
stefinfection Feb 4, 2026
0d7b5a3
Changed exit codes + exit messages for 1MB region runs to account for…
stefinfection Feb 24, 2026
1724649
Update RUFUS_VERSION to v1.1.3
stefinfection Feb 26, 2026
20df8a0
update to 1.1.4; remove redundant double quoting around filenames; fi…
stefinfection Feb 27, 2026
6466b8e
update version to 1.1.6
stefinfection Feb 27, 2026
ab37059
Update slurm setup to not require all inputs in single directory; add…
Mar 2, 2026
18a0870
trap
Mar 2, 2026
3603b1e
Shift hash fetching to internal script; update readme with hash examp…
Mar 2, 2026
954c9bd
Add sanitization step after RUFUS.Interpret to catch malformed lines;…
stefinfection Mar 4, 2026
e35ebae
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
stefinfection Mar 4, 2026
c9ad946
dockerfile version bump
stefinfection Mar 4, 2026
8e12456
Globals version bump
stefinfection Mar 4, 2026
860ed7f
Look for full parent paths when checking indexes; remove old debug out
Mar 5, 2026
bad5632
Fix breaking, redundant file path pass to remove_coinheriteds
Mar 5, 2026
349cbc0
If non-zero exit code, keep intermediate directory for debugging (in …
Mar 5, 2026
1c59228
Fix broken remove-coinheriteds script
Mar 5, 2026
3454f99
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
Mar 5, 2026
8fc9341
Fix bcftools sort commands; exits with 1 if no temp vcfs found; remov…
Mar 6, 2026
e469186
Update setup script to comply with new post-process script
Mar 6, 2026
f71ccfe
Remove region substring from parent column in vcf to allow for concat…
Mar 6, 2026
667f678
remove rufus.cmd storing; add exit reasons + logging; combine in post…
Mar 6, 2026
d3ad71d
Add exit code logging for region mode; add cleanup for intermediate p…
Mar 7, 2026
24e7861
Fix silent failure of removing region dir in cleanup trap
Mar 9, 2026
d829820
Fix header types throwing updated bcftools warnings
Mar 9, 2026
bf37c65
Fix bcftools segfault crash when trying to intersect control pileup a…
Mar 9, 2026
a163a68
update singularity readme
Mar 9, 2026
7b4412d
Update download link for RUFUS singularity image
stefinfection Mar 9, 2026
c1a89e9
Allow find ops for hashes to follow symlinks
Mar 9, 2026
64b41e3
Merge branch 'docker' of github.com:stefinfection/RUFUS into docker
Mar 9, 2026
3ede7c5
Detect input file type and update reference flag to -cr for crams whe…
Mar 9, 2026
4b2fd5c
Ensure only a single file type put in for subjects+controls - i.e. no…
Mar 9, 2026
4b69685
Commenting + clearer exit messages
Mar 16, 2026
848ebb3
Enable multiple subject input files
Mar 16, 2026
6e01580
Add dev bind to setup scripts for testing
Mar 16, 2026
41c0cab
version bump setup slurm
Mar 16, 2026
c430448
Change hash check to only first and last 10 to speed up; fix files, r…
Mar 31, 2026
0719594
Address bcftools merge and call bugs for multi-allelic records bricki…
Apr 7, 2026
9f83c0f
Clean up legacy files; preserved in legacy/full-codebase branch
Apr 30, 2026
744ff5b
Fix slurm time argument pickup in setup script
Jun 4, 2026
fb050cc
Add to ignore list
Jun 4, 2026
15f147e
Add parent low coverage argument to accommodate DSA controls; add has…
Jun 20, 2026
5f237af
Change default wg size to 16G for hash build; multi-thread samtools v…
Jun 22, 2026
c4102fb
Add Filter single end source back in and update cmake to build in con…
Jun 22, 2026
cb9377c
version bump
Jun 22, 2026
7c29ee1
Consolidate container build and add CI/CD pipeline
Jun 30, 2026
173118f
Fix samtools/bcftools build: point at /opt/htslib + ldconfig
Jun 30, 2026
db5d5db
Drop vestigial ubuntu-toolchain-r PPA that broke the apt layer
Jun 30, 2026
420b666
Regenerate modifiedJellyfish.tar.gz before cmake
Jun 30, 2026
c942646
Restore tracked modifiedJellyfish.tar.gz; build from it directly
Jun 30, 2026
bb8b844
Add release-tag guard: tag must match RUFUS_VERSION in globals.txt
Jun 30, 2026
a2803cc
Vendor modified jellyfish as a pinned submodule
Jul 1, 2026
878ca14
Fix submodule jellyfish build: autotools mtimes + add file pkg
Jul 1, 2026
2e75334
Bump CI actions to Node 24 runtimes
Jul 1, 2026
e97c9b6
Wire build job to GitHub Environments (dev/staging/production)
Jul 1, 2026
025e3b2
Fix broken variant calling and add functional test suite
stefinfection Jul 21, 2026
786e6a6
Validate BWA indexes at slurm setup instead of failing mid-run
Jul 21, 2026
ff3e750
Validate BWA indexes in the AWS launch path
Jul 21, 2026
d33d4d9
Drop ENVARGS overlay from F1 now that the image sets BCFTOOLS_PLUGINS
Jul 21, 2026
0a2584d
Add F2 somatic case; drop stale ENVARGS overlay from F1
Jul 21, 2026
34a7dee
Merge pull request #89 from stefinfection/fix/bwa-index-validation
stefinfection Jul 21, 2026
7b58878
Guard against 255+ chars in filenames
Jul 22, 2026
9dceeaf
Support paired-end FASTQ input (whole-genome)
Jul 22, 2026
246685c
Fix single-end FASTQ/filter hang (FIFO held open by exec fd)
Jul 22, 2026
c1c9180
Add FASTQ functional test cases (paired + single-end)
Jul 22, 2026
14a70ea
Add F3 input-format concordance case (BAM vs CRAM)
Jul 22, 2026
b76bd46
Validate BWA indexes in runRufus.sh itself
Jul 28, 2026
463adb8
Add RUFUS.interpret functional documentation and defect audit
Jul 28, 2026
73ae1bf
Add RUFUS.interpret replay harness and chr20_m5 baseline
Jul 28, 2026
80ada23
Merge master README update into docker
Jul 28, 2026
378af22
Merge interpret replay harness and audit
Jul 28, 2026
c5fc3cf
Point the staging trigger at main, not master
Jul 28, 2026
836d134
Distinguish a failed k-mer count from a region with no coverage
Jul 28, 2026
8b434b6
Document that the coverage model is never built, and correct the help…
Jul 28, 2026
8f43b26
Make VCF-finalization resume-safe: bgzip -f / index -f
Jul 28, 2026
9e07891
Fix control-hash query: pass full path, not stripped basename
Jul 28, 2026
d8e1f03
docs(interpret audit): verify FILTER=fail and correct 2.1 scope from …
Jul 28, 2026
b8bbbde
Bump version and branch in globals to 1.2.0
Jul 28, 2026
175c909
Correct audit 2.1: the model phase is unreachable in all modes, not j…
Jul 28, 2026
5130bb3
Skip remove_coinheriteds when no BAM/CRAM control is provided
Jul 28, 2026
c29cd64
Stop doc version strings drifting from globals.txt
Jul 28, 2026
c8b960e
post_process: find the whole-genome temp VCF (add .wg postfix)
Jul 28, 2026
1187116
README: document both Docker Hub and Zenodo download routes
Jul 28, 2026
da005ff
README: correct the input-data description; note the container-runtim…
Jul 28, 2026
a5fa8ea
README: document single-sample mode for the SLURM helper; note getopt…
Jul 28, 2026
04ccab0
Make -C cpus_per_call actually take its argument
Jul 29, 2026
1195f66
README: align the argument blocks to consistent columns
Jul 29, 2026
83d43d6
Fix help cosmetic fix in arg_parser slurm setup script
Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Docker COPY does not honor .gitignore, so exclude host build artifacts and bulk here.
# Keeping the context lean also avoids baking a stale local bin/ build into the image.
.git
bin/
*.sif
*.o
temp_dac/
testRun/
.idea/
cmake-build-debug/
rufus_figure.pdf
rufus_figure.png
rufus_figure.py
rufus_figure.pdf
src/externals/jellyfish-2.2.5/
src/externals/gkno_launcher/
121 changes: 121 additions & 0 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: build-publish

# Tag mapping:
# push to docker / dev -> stefinfection/rufus:dev (development)
# push to main -> stefinfection/rufus:stage (staging)
# push git tag v* -> stefinfection/rufus:<version> + :latest, then SIF -> Zenodo (prod)
on:
push:
branches: [docker, dev, main]
tags: ['v*']
workflow_dispatch:

env:
IMAGE: stefinfection/rufus

jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.meta.outputs.version }}
primary_tag: ${{ steps.meta.outputs.primary_tag }}
# Records a deployment to the matching GitHub Environment, giving a glanceable dev/stage/prod
# dashboard. The name is derived from the git ref (must be known at job start, so it uses the
# github context, not a step output). Arm the release gate by adding a required reviewer to the
# `production` environment in the repo settings — a v* tag build then waits for approval here.
environment:
name: ${{ startsWith(github.ref, 'refs/tags/v') && 'production' || github.ref == 'refs/heads/main' && 'staging' || 'development' }}
url: https://hub.docker.com/r/stefinfection/rufus/tags
steps:
- uses: actions/checkout@v5
with:
submodules: recursive # src/modifiedJellyfish is a submodule the image build needs

- name: Resolve version and image tags
id: meta
run: |
# RUFUS_VERSION lives in resources/globals.txt as RUFUS_VERSION="vX.Y.Z"
VERSION=$(grep -E '^RUFUS_VERSION=' resources/globals.txt | cut -d'"' -f2)
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

REF="${GITHUB_REF}"
if [[ "${REF}" == refs/tags/v* ]]; then
TAGNAME="${REF#refs/tags/}"
# Release guard: a prod tag must match RUFUS_VERSION in globals.txt, so the git tag,
# the image tag, the OCI version label, the runtime banner, and the Zenodo version
# can never disagree. Fail the release rather than publish an inconsistent one.
if [[ "${TAGNAME}" != "${VERSION}" ]]; then
echo "::error::Release tag '${TAGNAME}' does not match RUFUS_VERSION '${VERSION}' in resources/globals.txt. Bump globals.txt (and commit) before tagging, or retag to match." >&2
exit 1
fi
echo "tags=${IMAGE}:${TAGNAME},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
echo "primary_tag=${TAGNAME}" >> "$GITHUB_OUTPUT"
echo "is_release=true" >> "$GITHUB_OUTPUT"
elif [[ "${REF}" == refs/heads/main ]]; then
echo "tags=${IMAGE}:stage" >> "$GITHUB_OUTPUT"
echo "primary_tag=stage" >> "$GITHUB_OUTPUT"
echo "is_release=false" >> "$GITHUB_OUTPUT"
else
echo "tags=${IMAGE}:dev" >> "$GITHUB_OUTPUT"
echo "primary_tag=dev" >> "$GITHUB_OUTPUT"
echo "is_release=false" >> "$GITHUB_OUTPUT"
fi

# Runs on every build, not just releases, so drift is caught on a dev push to
# `docker` rather than at the moment of tagging. Fix with: --write
- name: Check doc version strings match globals.txt
run: bash scripts/ci/check_doc_versions.sh

- uses: docker/setup-buildx-action@v4

# Build locally first (load into the runner's docker) so the smoke test can gate the push.
- name: Build image
uses: docker/build-push-action@v7
with:
context: .
load: true
tags: ${{ env.IMAGE }}:ci-${{ github.sha }}
build-args: |
RUFUS_VERSION=${{ steps.meta.outputs.version }}

- name: Smoke test
run: docker run --rm ${{ env.IMAGE }}:ci-${{ github.sha }} bash /opt/RUFUS/tests/smoke_test.sh

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Re-tag the validated image and push. (The smoke test already ran on this exact build.)
- name: Tag and push
run: |
IFS=',' read -ra TAGS <<< "${{ steps.meta.outputs.tags }}"
for t in "${TAGS[@]}"; do
docker tag "${IMAGE}:ci-${{ github.sha }}" "$t"
docker push "$t"
done

release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install apptainer
uses: eWaterCycle/setup-apptainer@v2

- name: Build SIF from the published image
run: |
apptainer build "rufus_${{ needs.build.outputs.primary_tag }}.sif" \
"docker://${IMAGE}:${{ needs.build.outputs.primary_tag }}"

- name: Upload new version to Zenodo
env:
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
ZENODO_CONCEPT_RECORD_ID: ${{ secrets.ZENODO_CONCEPT_RECORD_ID }}
run: |
bash scripts/ci/zenodo_upload.sh \
"rufus_${{ needs.build.outputs.primary_tag }}.sif" \
"${{ needs.build.outputs.primary_tag }}"
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ src/externals/jellyfish-2.2.5/
src/externals/gkno_launcher/
cloud/1000G.RUFUSreference.sorted.min45.tab
*.o
*test*
idea/
idea/*
# Note: a blanket `*test*` rule used to live here. It silently dropped tracked files whose
# path contained "test" (our tests/ suite, and modified-jellyfish's tests/ dir), so it was
# removed. Add narrow, specific ignores here if test scratch output needs excluding.
# SLURM writes job logs beside the case scripts when you sbatch from tests/functional/cases/.
# Deliberately path-scoped and extension-scoped -- do NOT broaden these to `*test*` or `*.out`.
tests/functional/cases/*.out
tests/functional/cases/*.err
.idea/
.idea/*
cmake-build-debug/*
cmake-build-debug/
singularity/rufus_v1.0.0-epsilon.sif
temp_dac/
cleanup.sh
rufus_figure.pdf
rufus_figure.py
rufus_figure.png
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/modifiedJellyfish"]
path = src/modifiedJellyfish
url = https://github.com/stefinfection/modified-jellyfish.git
102 changes: 102 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# RUFUS — canonical container definition (single source of truth).
# SIFs are built from this image via `apptainer pull/build docker://...`; there is no separate .def file.
FROM ubuntu:22.04

# Build-time version, passed by CI from resources/globals.txt (defaults to "dev" for local builds).
ARG RUFUS_VERSION=dev

LABEL author="Stephanie Georges"
LABEL org.opencontainers.image.title="RUFUS"
LABEL org.opencontainers.image.version="${RUFUS_VERSION}"
LABEL org.opencontainers.image.source="https://github.com/stefinfection/RUFUS"

ENV DEBIAN_FRONTEND=noninteractive

# Pinned external tool versions (last reviewed Jan 2025).
ARG HTSLIB_VERSION="1.21"
ARG BAMTOOLS_VERSION="v2.5.2"
ARG BEDTOOLS_VERSION="2.31.1"

# System + build dependencies. Most of these (parallel, gawk, vt, bc, libgsl, the lib*-dev
# packages) are required at RUNTIME by runRufus.sh and the samtools/bcftools stack, so this
# stays a single stage rather than a slimmed multi-stage build.
# Note: the historical Dockerfiles added ppa:ubuntu-toolchain-r/test but never installed a
# newer g++ from it -- the default ubuntu 22.04 g++ 11 builds RUFUS. The PPA was vestigial and
# (under --no-install-recommends) broke the build on a missing gnupg, so it is dropped.
RUN apt-get update && \
apt-get install -y \
git cmake wget g++ build-essential zlib1g-dev libbz2-dev bc \
libgsl0-dev libncurses5-dev autoconf automake make liblzma-dev \
libcurl4-gnutls-dev libssl-dev vt parallel gawk libjsoncpp-dev \
libjsoncpp25 curl unzip ca-certificates file && \
rm -rf /var/lib/apt/lists/*

# AWS CLI — required at runtime: resource_helpers/download_hash.sh fetches region-specific
# 1000G/control exclusion hashes from S3 via `aws s3 ... --no-sign-request`.
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip -q awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip aws

# htslib (provides bgzip/tabix + the libhts that samtools/bcftools link against) -> /usr/local.
# Keep the /opt/htslib source tree so samtools/bcftools can build against it via --with-htslib;
# run ldconfig so the runtime linker picks up the freshly installed /usr/local/lib/libhts.
RUN cd /opt && \
git clone --recurse-submodules https://github.com/samtools/htslib.git --depth 1 --branch "${HTSLIB_VERSION}" && \
cd htslib && autoreconf -i && ./configure && make && make install && ldconfig

# samtools -> /usr/local (linked against the /opt/htslib source above)
RUN cd /opt && \
git clone https://github.com/samtools/samtools.git --depth 1 --branch "${HTSLIB_VERSION}" && \
cd samtools && autoheader && autoconf -Wno-syntax && \
./configure --with-htslib=/opt/htslib && make && make install && \
cd /opt && rm -rf samtools

# bcftools -> /usr/local (last htslib consumer; drop the htslib source tree afterward)
RUN cd /opt && \
git clone https://github.com/samtools/bcftools.git --depth 1 --branch "${HTSLIB_VERSION}" && \
cd bcftools && autoheader && autoconf && \
./configure --with-htslib=/opt/htslib --enable-libgsl && make && make install && \
cd /opt && rm -rf bcftools htslib

# bamtools -> /usr/local
RUN cd /opt && \
git clone https://github.com/pezmaster31/bamtools.git --depth 1 --branch "${BAMTOOLS_VERSION}" && \
cd bamtools && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && make install && \
cd /opt && rm -rf bamtools

# bedtools -> /usr/local/bin
RUN cd /opt && \
wget -q "https://github.com/arq5x/bedtools2/releases/download/v${BEDTOOLS_VERSION}/bedtools-${BEDTOOLS_VERSION}.tar.gz" && \
tar -zxf "bedtools-${BEDTOOLS_VERSION}.tar.gz" && \
cd bedtools2 && make && cp bin/* /usr/local/bin/ && \
cd /opt && rm -rf bedtools2 "bedtools-${BEDTOOLS_VERSION}.tar.gz"

# RUFUS — built from the checked-out source tree (not a pinned git clone), so each branch/tag
# builds its own code. CMake fetches and builds the bundled externals (modified jellyfish, etc.).
COPY . /opt/RUFUS
RUN cd /opt/RUFUS && mkdir -p bin && cd bin && cmake ../ && make

# Drop the largest build-only packages; keep the rest since runtime depends on them.
RUN apt-get purge -y --auto-remove git wget && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ENV DEBIAN_FRONTEND=
ENV PATH=/opt/RUFUS/bin:${PATH}
ENV RUFUS_ROOT=/opt/RUFUS
# Pin bcftools to the plugins we built above. Without this the HOST's BCFTOOLS_PLUGINS is
# inherited into the container (near-universal on HPC, where a bcftools module is usually
# loaded), and our bcftools dlopens the host's mismatched plugin:
# fill-from-fasta.so: undefined symbol: bcf_format_gt_v2
# which kills the VCF post-processing stage. Setting it here makes the image immune to host env.
ENV BCFTOOLS_PLUGINS=/usr/local/libexec/bcftools
ENV LC_CTYPE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

# Smoke test — fails the build if any expected binary or env var is missing.
RUN bash /opt/RUFUS/tests/smoke_test.sh

WORKDIR /data
CMD ["/bin/bash"]
Loading
Loading