Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpliSync

SpliSync is a Genomic Language Model-driven method for splice site correction in long read RNA-seq alignments. It produces corrected BED/BAM outputs that can be used in downstream transcriptomic analyses, including isoform identification, quantification, and alternative splicing analysis. SpliSync is currently suited for reads produced with the Oxford Nanopore technologies.

Described in:

  • Lui WW and Florea L (2026). SpliSync: Genomic language model-driven splice site correction of long RNA sequencing reads. Submitted. [Supp. data, Suppl. scripts]
Copyright (C) 2026, and GNU GPL v3.0, by Wui Wang Lui, Liliana Florea

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Table of contents

What is SpliSync?

SpliSync is a genomic language model-driven Python package for correcting splice sites and introns in long read RNA-seq spliced alignments. It integrates a pre-trained genomic sequence model, HyenaDNA, alignment data, and a U-net architecture to predict splice sites at nucleotide resolutionin the underlying genomic sequence. SpliSync can correct splice sites based solely on the input alignments and without the use of a reference annotation, and therefore can detect novel splice sites. It can also leverage annotation, if available, to improve its predictions. SpliSync substantially improves the accuracy of RNA long-read alignments across datasets generated with diverse ONT technologies (cDNA, direct RNA, direct cDNA, CapTrap, R2C2), chemistries (R9, R10), and from a wide range of vertebrate species.

✨ Key Features

  • A genomic language model-based method that combines alignment and sequence information to improve splice site predictions;
  • Can be used with or without a reference annotation, and can detect novel splice sites;
  • Applicable to a range of vertebrates;
  • Produces a list of corrected splice sites and the set of corrected alignments, in BAM/BED format;
  • Suitable for all ONT chemistries and library preparations;
  • Can be run on a GPU in ~15-30 min per sample, or on a CPU in hours.

🚀 Quick Start / Installation

  1. Clone the repository and enter the project directory.
# install and init git lfs (required to fetch the pretrained models)
conda install -c conda-forge git-lfs
git lfs install

git clone https://github.com/splicebox/SpliSync.git
cd SpliSync
  1. Create the conda environment from splisync_env.yml:
conda env create -f splisync_env.yml
conda activate splisync
  1. Build the addXS helper binary from AddXS.cpp (required if you want XS tags in the corrected BAMs):
g++ -c -o addXS.o -I./samtools-0.1.19 -L./samtools-0.1.19 -Wall -O3 AddXS.cpp -lbam -lz -lm -lpthread
g++ -o addXS -I./samtools-0.1.19 -L./samtools-0.1.19 -Wall -O3 addXS.o -lbam -lz -lm -lpthread
  1. Prepare inputs:
    • A sorted, indexed BAM file containing long-read RNA-seq alignments.
    • A reference genome FASTA file (indexed with samtools faidx).

More details are provided below.

🧪 Usage

Inference pipeline

Edit the configuration variables at the top of run_inference.sh to reflect the variables (i.e., path to SpliSync code, inout alignments and genome sequence) on your system, then run:

bash run_inference.sh <input_bam> <genomeref_fasta>

Notebook demo

Open demo.ipynb for a step-by-step, reproducible walkthrough of the inference workflow.

📊 Inputs and Outputs

Inputs

File Format Description Example
Aligned Reads BAM (sorted, indexed) Long-read RNA-seq alignments (Nanopore cDNA/dRNA/CapTrap/R2C2), coordinate-sorted and with a .bai index. reads_aligned.bam
Reference Genome FASTA (faidx-indexed) Reference genome sequence. Index generated automatically by samtools faidx. GRCh38.p13.genome.fa
Model Checkpoint PyTorch .ckpt Pretrained weights for splice-site correction. Provided in model_weights/. model_weights/cdna_r9.ckpt

The input BAM files can be generated by Minimap2 using the technology-matched command line options, in particular -ax splice preset for cDNA input and -ax splice -uf -k14 (to enforce the forward transcript strand and optimized k-mer size for noisy direct RNA reads) for direct RNA input, for example:

# cDNA
minimap2 -ax splice  -t 24 ref_genome.fa input_reads.fastq |samtools sort -t 24 > aligned_reads.bam

# dRNA
minimap2 -ax splice -uf -k14 -t 24 ref_genome.fa input_reads.fastq |samtools sort -t 24 > aligned_reads.bam

Outputs

File Format Description
Corrected BED BED12 Corrected transcript intervals with updated splice-site block boundaries. Each row is a corrected isoform.
Corrected BAM BAM Reconstructed BAM file with corrected coordinates and (optionally) XS tags for strand-specific junction analysis.
Predictions TSV Model confidence scores and splice-site calls for each junction. Columns: chrom, coord, score, is_intron_end, strand.
Intermediate Data NumPy Curated feature embeddings from the reference and reads; used for model inference. Stored in inferencedata_* directory.

Example Workflow I/O

Input:
├── reads_aligned.bam          # 500k aligned Nanopore cDNA reads
└── GRCh38.p13.genome.fa       # Human reference (faidx-indexed)

Configuration (run_inference.sh):
├── MODEL_CKPT = "./model_weights/cdna_r9.ckpt"
├── INPUT_BAM = "reads_aligned.bam"
└── REF_FASTA = "GRCh38.p13.genome.fa"

Output:
├── reads_aligned.corrected.cleaned.bed                    # Corrected isoforms (BED12)
├── reads_aligned.corrected.cleaned.bam                    # Corrected alignments (with XS tags)
├── inferencedata_reads_aligned.bam.merge.predictions.tsv  # Splice-site confidence scores
└── reads_aligned.intron_marks                             # Intermediate intron annotations

🤝 Support and Contributing

Contact: Please submit an Issue through this Github page, or email us directly: Ed Lui - wlui3@jhu.edu, Liliana Florea - florea@jhu.edu.

Contributions are welcome!

  • Open an issue for bugs or feature requests.
  • Fork the repo and create a feature branch.
  • Keep scripts reproducible and document any new inputs/outputs.
  • Submit a pull request with a clear description of the change.

📄 License

SpliSync is distributed under the GNU General Public License v3.0. Please see the file LICENSE for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

About

Genomic language model-driven correction of splice sites in long RNA read alignments

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages