Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8ef1efd
ci: add test for sra download
dlaehnemann Nov 24, 2025
23ec3c3
docs: copy some nice detailed explanations in example config.yaml fro…
dlaehnemann Nov 24, 2025
64a6518
chore: prettier yaml files
dlaehnemann Nov 24, 2025
f2a1ac8
fix: correct read infix in get_units_fastq() for sra-downloaded fastq…
dlaehnemann Nov 24, 2025
9854d59
fix: use existing versions of star snakemake wrappers (3.3.7), to mak…
dlaehnemann Nov 24, 2025
c54fa67
ci: update all the GitHub Actions versions
dlaehnemann Nov 24, 2025
fe87a0f
Revert "fix: use existing versions of star snakemake wrappers (3.3.7)…
dlaehnemann Nov 24, 2025
34e50d1
ci: fix release-please-action namespace to new googleapis
dlaehnemann Nov 24, 2025
b42bbed
fix: ensure `release:` in `config.yaml` files is integer
dlaehnemann Nov 24, 2025
22ee73e
ci: fix gallus_gallus genome build to bGalGal1.mat.broiler.GRCg7b
dlaehnemann Nov 24, 2025
cc8f46b
fix: the right config.yaml :facepalm:
dlaehnemann Nov 25, 2025
7faf652
ci: use yeeast dataset for SRA download testing, as gallus_gallus gen…
dlaehnemann Nov 27, 2025
cc2bed3
ci: use some paired-end example data for sra download testing
dlaehnemann Nov 27, 2025
7278404
ci: try freeing disk space in GitHub Actions runner
dlaehnemann Nov 28, 2025
63319ca
ci: use same reference genome in all GitHub Actions tests
dlaehnemann Nov 28, 2025
f3a6ee9
ci: always remove previous results after testing report generation
dlaehnemann Nov 28, 2025
df8e164
ci: try getting fasterq-dump to use GitHub Actions runner's temp dire…
dlaehnemann Nov 28, 2025
48fb793
ci: report fasterq-dump disk size limits
dlaehnemann Nov 28, 2025
9a6995a
ci: try with yet another dataset, to reduce ci disk usage footprint
dlaehnemann Dec 1, 2025
1e16307
chore: prettier .github/workflows/main.yml
dlaehnemann Dec 4, 2025
67a6fce
chore: prettier .test/ config.yaml files
dlaehnemann Dec 4, 2025
f2be7b0
ci: update github/super-linter to v8
dlaehnemann Dec 4, 2025
461b8a1
ci: don't trust coderabbitai on versions of stuff, it just confidentl…
dlaehnemann Dec 4, 2025
ea04b91
ci: switch to super-linter-super-linter action, which does have a ver…
dlaehnemann Dec 4, 2025
0ae268f
ci: consistently include `--software-deployment-method conda`, even i…
dlaehnemann Dec 4, 2025
07854fb
ci: fix copy-pasta misplacement
dlaehnemann Dec 4, 2025
a100b78
ci: switch to matrix setup for fail-fast and to try to circumenvent t…
dlaehnemann Dec 4, 2025
6e11771
ci: skip updating apt if free-disk-space job is not run
dlaehnemann Dec 4, 2025
37ffd24
ci: cleanup leftovers from previous setup
dlaehnemann Dec 4, 2025
273832e
fix: config_sra uses existing column for pca
dlaehnemann Dec 15, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/conventional-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142 changes: 94 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,106 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Formatting
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_SNAKEMAKE_SNAKEFMT: true
- name: Checkout with submodules
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Formatting
uses: super-linter/super-linter@v8
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_SNAKEMAKE_SNAKEFMT: true
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Linting
uses: snakemake/snakemake-github-action@v1.22.0
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_complex/config.yaml --lint"
- uses: actions/checkout@v6
- name: Linting
uses: snakemake/snakemake-github-action@v2
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_complex/config.yaml --lint"

run-workflow:
testing:
runs-on: ubuntu-latest
needs:
- linting
- formatting
strategy:
fail-fast: true
matrix:
case:
- name: basic model, no batch_effects
args: >-
--configfile .test/config_basic/config.yaml
report: true
free_disk_space: false

- name: multiple variables_of_interest, include batch_effects
args: >-
--configfile .test/config_complex/config.yaml
report: true
free_disk_space: false
- name: sra file download, no batch_effects
args: >-
--configfile .test/config_sra/config.yaml
report: true
free_disk_space: true

name: test ${{ matrix.case.name }}

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Test workflow (basic model, no batch_effects)
uses: snakemake/[email protected]
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_basic/config.yaml --use-conda --show-failed-logs --cores 2 --conda-cleanup-pkgs cache"
- name: Test report (basic model, no batch_effects)
uses: snakemake/[email protected]
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_basic/config.yaml --report report.zip"
- name: Test workflow (multiple variables_of_interest, include batch_effects)
uses: snakemake/[email protected]
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_complex/config.yaml --use-conda --show-failed-logs --cores 2 --conda-cleanup-pkgs cache"
- name: Test report (multiple variables_of_interest, include batch_effects)
uses: snakemake/[email protected]
with:
directory: .test
snakefile: workflow/Snakefile
args: "--configfile .test/config_complex/config.yaml --report report.zip"
- name: update apt
if: ${{ matrix.case.free_disk_space }}
run: sudo apt-get update

- name: Free Disk Space (Ubuntu)
if: ${{ matrix.case.free_disk_space }}
uses: jlumbroso/[email protected]
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true

- name: Checkout repository with submodules
uses: actions/checkout@v6
with:
submodules: recursive

- name: run workflow
uses: snakemake/snakemake-github-action@v2
with:
directory: .test
snakefile: workflow/Snakefile
args: >-
--conda-cleanup-pkgs cache
--software-deployment-method conda
--show-failed-logs
--cores 8
${{ matrix.case.args }}
show-disk-usage-on-error: true

- name: generate report
if: ${{ matrix.case.report }}
uses: snakemake/snakemake-github-action@v2
with:
directory: .test
snakefile: workflow/Snakefile
args: >-
--software-deployment-method conda
--cores 1
--report report.zip
${{ matrix.case.args }}
show-disk-usage-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
with:
release-type: simple
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions .test/config_basic/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
samples: config_basic/samples.tsv
units: config_basic/units.tsv


ref:
species: saccharomyces_cerevisiae
release: 100
release: 115
build: R64-1-1


trimming:
activate: True

Expand Down
5 changes: 1 addition & 4 deletions .test/config_complex/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
samples: config_complex/samples.tsv
units: config_complex/units.tsv


ref:
species: saccharomyces_cerevisiae
release: 100
release: 115
build: R64-1-1


trimming:
activate: False

Expand Down Expand Up @@ -44,4 +42,3 @@ params:
star:
index: ""
align: ""

40 changes: 40 additions & 0 deletions .test/config_sra/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# For a fully commented config.yaml file, see the main `config/config.yaml`
# example file.

samples: config_sra/samples.tsv
# This data comes from:
# * https://www.ncbi.nlm.nih.gov/bioproject/PRJEB30262
# * https://www.ncbi.nlm.nih.gov/Traces/study/?acc=PRJEB30262&o=acc_s%3Aa
units: config_sra/units.tsv

ref:
species: saccharomyces_cerevisiae
release: 115
build: R64-1-1

trimming:
activate: True

mergeReads:
activate: False

pca:
activate: True
labels:
- genotype

diffexp:
variables_of_interest:
genotype:
base_level: control
batch_effects: ""
contrasts:
stb5_vs_control:
variable_of_interest: genotype
level_of_interest: stb5
model: ~genotype

params:
star:
index: ""
align: ""
5 changes: 5 additions & 0 deletions .test/config_sra/samples.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sample_name genotype
control_g_1 control
control_g_2 control
stb5_g_1 stb5
stb5_g_2 stb5
9 changes: 9 additions & 0 deletions .test/config_sra/units.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sample_name unit_name fq1 fq2 sra fastp_adapters fastp_extra strandedness
control_g_1 lane1 ERR2985811
control_g_1 lane2 ERR2985812
control_g_2 lane1 ERR2985815
control_g_2 lane2 ERR2985816
stb5_g_1 lane1 ERR2985827
stb5_g_1 lane2 ERR2985828
stb5_g_2 lane1 ERR2985831
stb5_g_2 lane2 ERR2985832
34 changes: 28 additions & 6 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,36 @@ samples: config/samples.tsv
# sample).
units: config/units.tsv


ref:
# Ensembl species name
# ensembl species name:
# This species needs to be available for download via the Ensembl FTP site.
# For a quick check, see the Ensembl species list:
# https://www.ensembl.org/info/about/species.html
# For full valid species names, consult the respective table for the release
# you specify, for example for ‘115’ this is at:
# https://ftp.ensembl.org/pub/release-115/species_EnsemblVertebrates.txt
# And to browse available downloads in more detail, see the FTP server:
# https://ftp.ensembl.org/pub/
species: homo_sapiens
# Ensembl release (make sure to take one where snpeff data is available, check 'snpEff databases' output)
release: 100
# Genome build
# ensembl release version:
# Update this to the latest working version, when you first set up a new
# analysis on a dataset. You can usually find the latest release in the
# Ensembl blog, by looking at the latest posts of the release category:
# https://www.ensembl.info/category/01-release/
# Later, it only makes sense to update (or downgrade) the release versions
# if either (a) the version you are using consistently fails to download
# (some Ensembl release versions are just broken) or (b) you know that a
# newer version will include changes that will fix some error or adds
# transcripts that will be relevant to your analysis.
release: 115
# genome build:
# Usually, this should just be the main build listed in:
# https://ftp.ensembl.org/pub/release-115/species_EnsemblVertebrates.txt
# For example, for homo_sapiens, you strip the assembly column entry
# "GRCh38.p12" down to "GRCh38". If in doubt, navigate to the respective
# cdna folder on the FTP server, and look for the correct build in the
# file names there. For example "GRCh38" in:
# https://ftp.ensembl.org/pub/release-115/fasta/homo_sapiens/cdna/
build: GRCh38

trimming:
Expand Down Expand Up @@ -64,7 +87,6 @@ diffexp:
# model: ~jointly_handled + treatment_1 + treatment_2
model: ""


# passing extra parameters to respective rules in the workflow
params:
star:
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_units_fastqs(wildcards):
return expand(
"sra/{accession}_{read}.fastq",
accession=accession,
read=["R1", "R2"],
read=["1", "2"],
)
if not is_paired_end(wildcards.sample):
return [
Expand Down
2 changes: 2 additions & 0 deletions workflow/rules/trim.smk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ rule get_sra:
"sra/{accession}_2.fastq",
log:
"logs/get-sra/{accession}.log",
params:
extra="-x",
wrapper:
"v7.2.0/bio/sra-tools/fasterq-dump"

Expand Down
Loading