Skip to content

Commit 2e0e5d5

Browse files
author
Robert Patton
committed
Nextflow initital implementation for containerization
1 parent 21d20b9 commit 2e0e5d5

139 files changed

Lines changed: 750552 additions & 40469 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Directories
2+
.git/
3+
.gitignore
4+
results/
5+
logs/
6+
work/
7+
.nextflow/
8+
.nextflow.log*
9+
.DS_Store
10+
11+
# Snakemake specific
12+
.snakemake/
13+
14+
# Python
15+
__pycache__/
16+
*.py[cod]
17+
*$py.class
18+
*.so
19+
.Python
20+
*.egg-info/
21+
22+
# Documentation and misc
23+
*.md
24+
!README.md
25+
misc/
26+
plotting/
27+
28+
# Large data files
29+
*.bam
30+
*.bam.bai
31+
*.npz
32+
*.tsv
33+
*.bed
34+
*.fa
35+
*.fasta
36+
*.fai
37+
38+
# Config files (will be mounted at runtime)
39+
config/samples.yaml
40+
config/cluster_slurm.yaml

.github/workflows/docker-build.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build and Push Docker Container
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
branches:
11+
- main
12+
workflow_dispatch:
13+
14+
env:
15+
REGISTRY: docker.io
16+
IMAGE_NAME: triton
17+
18+
jobs:
19+
build-and-push:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
packages: write
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Log in to Docker Hub
33+
if: github.event_name != 'pull_request'
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
40+
- name: Extract metadata
41+
id: meta
42+
uses: docker/metadata-action@v5
43+
with:
44+
images: ${{ env.REGISTRY }}/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
45+
tags: |
46+
type=ref,event=branch
47+
type=ref,event=pr
48+
type=semver,pattern={{version}}
49+
type=semver,pattern={{major}}.{{minor}}
50+
type=raw,value=latest,enable={{is_default_branch}}
51+
52+
- name: Build and push Docker image
53+
uses: docker/build-push-action@v5
54+
with:
55+
context: .
56+
push: ${{ github.event_name != 'pull_request' }}
57+
tags: ${{ steps.meta.outputs.tags }}
58+
labels: ${{ steps.meta.outputs.labels }}
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max
61+
62+
- name: Generate Singularity recipe
63+
if: github.event_name != 'pull_request'
64+
run: |
65+
echo "Bootstrap: docker" > Singularity.def
66+
echo "From: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest" >> Singularity.def
67+
echo "" >> Singularity.def
68+
echo "%help" >> Singularity.def
69+
echo " Triton - cfDNA fragmentomics and nucleosome analysis pipeline" >> Singularity.def
70+
echo " See https://github.com/${{ github.repository }} for more information" >> Singularity.def
71+
72+
- name: Upload Singularity recipe
73+
if: github.event_name != 'pull_request'
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: singularity-recipe
77+
path: Singularity.def

.gitignore

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
# local
2-
panel_info/GTRD_F1000_BackgroundPanel.npz
3-
panel_info/MANE.GRCh38.v1.3_TranscriptBodies_BackgroundPanel.npz
4-
panel_info/MANE.GRCh38.v1.3_TSS_BackgroundPanel.npz
5-
panel_gb/
6-
panel_tss/
7-
panel_info/results/*.npz
8-
panel_info/logs/cluster/*.out
9-
10-
# Byte-compiled / optimized / DLL files
111
__pycache__/
122
*.py[cod]
133
*$py.class
852 KB
Binary file not shown.
840 KB
Binary file not shown.
856 KB
Binary file not shown.
874 KB
Binary file not shown.
858 KB
Binary file not shown.
835 KB
Binary file not shown.
871 KB
Binary file not shown.

0 commit comments

Comments
 (0)