Skip to content

Add SpliceAI2 modules, subworkflow and workflow - #37

Merged
alejandrogzi merged 6 commits into
masterfrom
spliceai2
Oct 15, 2026
Merged

alejandrogzi merged 6 commits into
masterfrom
spliceai2

Conversation

@alejandrogzi

Copy link
Copy Markdown
Member

Adds SpliceAI2 to core: four modules, a subworkflow and a workflow, plus the catalog entry.

What is added

  • modules/nextflow/spliceai2/chunk: splits the genome into strand-aware chunks (spliceai2 chunk).
  • modules/nextflow/spliceai2/predict: per-chunk donor and acceptor WIGs on both strands (spliceai2 predict, GPU).
  • modules/nextflow/spliceai2/transcripts: optional transcripts BED12 for a loci BED6 (spliceai2 transcripts, GPU).
  • modules/nextflow/spliceai2/publish: copies the final outputs.
  • subworkflows/spliceai2: chunk → predict → WIG to bigWig → per-track merge, and the optional transcripts branch.
  • workflows/spliceai2: the entry point (--genome, --spliceai2_models, optional --spliceai2_loci).

Usage notes

  • The container is ghcr.io/hillerlab/spliceai2:latest (0.0.6, from Add SpliceAI2 container: genome-wide splice sites and per-locus transcripts containers#69).
  • The model weights are not in the image. Pass --spliceai2_models pointing to a directory with
    spliceai2_multispecies_13M_01/ and spliceai2_multispecies_13M_02/, obtained under Illumina's terms.
  • Inference runs with --no-compile: torch.compile needs a writable HOME and a C compiler, and the Apptainer task has neither.
    Other flags can still be passed through ext.args.
  • --spliceai2_loci needs a FASTA index next to the genome: genome.fa.fai, or for genome.fa.gz an index of the uncompressed
    sequence named genome.fa.fai. Core has no samtools faidx module, so a missing index fails early with a message saying so.

Tests

Real runs with -profile apptainer on an L4, using only hillerlab.config and the published image:

run tasks
uncompressed FASTA + loci 13/13 exit 0
compressed chunks + loci 13/13 exit 0
no loci 12/12 exit 0
gzipped FASTA + loci 14/14 exit 0
  • The workflow's four WIGs are byte-identical to a direct spliceai2 predict run.
  • The merged bigWigs match the direct output at every base on both strands.
  • The transcripts BED12 is byte-identical to a direct spliceai2 transcripts run, including the gzipped-genome run.
  • The SpliceAI2 subworkflow stub runs pass.

Known issue (pre-existing, unchanged here)

modules/nextflow/chromsize's stub writes ${prefix}/chrom.sizes with prefix = meta.id, while the real script and the
declared output use genome.baseName. A full-workflow -stub-run therefore stops at CHROMSIZE. Real runs are unaffected.

@alejandrogzi
alejandrogzi merged commit 16709b3 into master Oct 15, 2026
2 checks passed
@alejandrogzi
alejandrogzi deleted the spliceai2 branch October 15, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant