LRSinglecell (IntGenomicsLab/lrsinglecell) is a bioinformatics pipeline for single-cell/nuclei long-read sequencing data from Oxford Nanopore. It processes 10X Genomics cDNA libraries (gene and isoform quantification) and single-cell DNA libraries, either separately or together in one run (e.g. 10X Multiome), from raw FASTQ to deduplicated per-cell BAMs, feature-barcode matrices and QC reports.
LRSinglecell is derived from nf-core/scnanoseq v1.3.0 and extends it with DNA support, flexiplex demultiplexing, gene-aware UMI deduplication and an lr-kallisto quantifier. See the CHANGELOG for everything that differs from nf-core/scnanoseq.
The pipeline is built using Nextflow and the nf-core template, with one container per process for reproducibility.
- Raw read QC (
NanoPlot, optionallyFastQC,NanoCompandToulligQC) - Optional FASTQ splitting for parallelisation (
seqkit) - Read trimming and filtering (
Chopper) - Barcode and UMI demultiplexing, per data type:
- cDNA:
- Alignment to the genome and/or transcriptome (
minimap2) and alignment QC (SAMtools,RSeQC) - Gene tagging and gene/transcript-aware UMI deduplication (
UMI-tools) - Quantification with any combination of
IsoQuant(gene + transcript),oarfish(transcript) andlr-kallisto(gene + transcript, alignment-free), for called cells and, optionally, all droplets - Preliminary matrix QC (
Seurat)
- Alignment to the genome and/or transcriptome (
- DNA:
- QC report for raw and processed reads, alignment, deduplication and matrices (
MultiQC)
Note
If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test (cDNA), -profile test_dna (DNA) or -profile test_mixed (both) before running the workflow on actual data.
First, prepare a samplesheet with your input data that looks as follows:
sample,fastq,cell_count,type
CONTROL_REP1,AEG588A1_S1.fastq.gz,5000,cdna
CONTROL_REP1,AEG588A1_S2.fastq.gz,5000,cdna
CONTROL_REP1,AEG588A1_DNA.fastq.gz,5000,dnaEach row represents a single-end FASTQ file. Rows with the same sample and type are merged before processing. cell_count is the expected number of cells, and type (cdna or dna, default cdna) selects the processing arm.
Now, you can run the pipeline using:
nextflow run IntGenomicsLab/lrsinglecell \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--genome_fasta genome.fa \
--gtf genes.gtf \
--barcode_format 10X_3v3 \
--quantifier isoquant \
--outdir <OUTDIR>--quantifier (isoquant, oarfish, lrkallisto, comma-separated) is only required when the samplesheet contains cDNA samples.
Warning
Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.
For more details and further functionality, please refer to the usage documentation and the parameter schema.
The main outputs are, per sample and data type, deduplicated BAMs and (for cDNA) gene- and transcript-level feature-barcode matrices that can be read directly by Seurat and similar packages, together with QC metrics and a MultiQC report. For details about the output files and reports, please refer to the output documentation.
If you experience any issues, please open an issue on our GitHub repository. However, some resolutions for common issues will be noted below:
- Due to the nature of the data this pipeline analyzes, some tools may experience increased runtimes. For some of the custom tools made for this pipeline (
preextract_fastq.pyandcorrect_barcodes.py), we have leveraged the splitting done via thesplit_amountparameter to decrease their overall runtimes. Thesplit_amountparameter will split the input FASTQs into a number of FASTQ files, each containing a number of lines based on the value used for this parameter. As a result, it is important not to set this parameter to be too low as doing so would cause the creation of a large number of files the pipeline will be processed. While this value can be highly dependent on the data, a good starting point for an analysis would be to set this value to500000. If you find thatPREEXTRACT_FASTQandCORRECT_BARCODESare still taking long amounts of time to run, it would be worth reducing this parameter to200000or100000, but keeping the value on the order of hundred of thousands or tens of thousands should help with keeping the total number of processes minimal. An example of setting this parameter to be equal to 500000 is shown below:
split_amount: 500000- We have seen a recurrent node failure on slurm clusters that does seem to be related to submission of Nextflow jobs. This issue is not related to this pipeline per se, but rather to Nextflow itself. We are currently working on a resolution. But we have two methods that appear to help overcome should this issue arise:
- Provide a custom config that increases the memory request for the job that failed. This may take a couple attempts to find the correct requests, but we have noted that there does appear to be a memory issue occasionally with these errors.
- Request an interactive session with a decent amount of time and memory and CPUs in order to run the pipeline on the single node. Note that this will take time as there will be minimal parallelization, but this does seem to resolve the issue.
- We note that umitools dedup can take a large amount of time in order to perform deduplication. One approach we have implemented to assist with speed is to split input files based on chromosome. However for the transcriptome aligned bams, there is some additional work required that involves grouping transcripts into appropriate chromosomes. In order to accomplish this, the pipeline needs to parse the transcript id from the transcriptome FASTA file. The transcript id is often nested in the sequence identifier with additional data and the data is delimited. We have included the delimiters used by reference files obtained from GENCODE, NCBI, and Ensembl. However in case you wish to explicitly control this or if the reference file source uses a different delimiter, you are able to manually set it via the
--fasta_delimiterparameter. - We acknowledge that analyzing PromethION data is a common use case for this pipeline. Currently, the pipeline has been developed with defaults to analyze GridION and average sized PromethION data. For cases, where jobs have fail due for larger PromethION datasets, the defaults can be overwritten by a custom configuation file (provided by the
-cNextflow option) where resources can be increased (substantially in some cases). Below are some of the overrides we have used, and while these amounts may not work on every dataset, these will hopefully at least note which processes will need to have their resources increased:
process
{
withName: '.*:.*FASTQC.*'
{
cpus = 20
}
}
process
{
withName: '.*:BLAZE'
{
cpus = 30
}
}
process
{
withName: '.*:TAG_BARCODES'
{
memory = '60.GB'
}
}
process
{
withName: '.*:SAMTOOLS_SORT'
{
cpus = 20
}
}
process
{
withName: '.*:MINIMAP2_ALIGN'
{
cpus = 20
}
}
process
{
withName: '.*:ISOQUANT'
{
cpus = 30
memory = '85.GB'
}
}We further note that while we encourage the use of split_amount as discussed above for larger datasets, the pipeline can be executed without enabling this parameter. When doing this, please consider increasing the time limit to CORRECT_BARCODES as it can take hours instead of minutes when split_amount is disabled:
//NOTE: with split_amount disabled, consider increasing the time limit to CORRECT_BARCODES
process
{
withName: '.*:CORRECT_BARCODES'
{
time = '15.h'
}
}LRSinglecell is written and maintained by Luuk Harbers at the Integrative Cancer Genomics Lab (VIB-KU Leuven).
It is derived from nf-core/scnanoseq, originally written by Austyn Trull and Dr. Lara Ianov at the University of Alabama at Birmingham Biological Data Science Core (U-BDS). We thank them and the nf-core/scnanoseq contributors for the foundation this pipeline builds on.
If you would like to contribute to this pipeline, please see the contributing guidelines.
If you use LRSinglecell for your analysis, please also cite nf-core/scnanoseq, on which it is based:
scnanoseq: an nf-core pipeline for Oxford Nanopore single-cell RNA-sequencing
Austyn Trull, Elizabeth A. Worthey, Lara Ianov
Bioinformatics, Volume 41, Issue 9, September 2025, btaf487, https://doi.org/10.1093/bioinformatics/btaf487
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.
This pipeline uses code and infrastructure developed and maintained by the nf-core community, reused here under the MIT license.
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x
Empowering bioinformatics communities with Nextflow and nf-core.
Langer, B.E., Amaral, A., Baudement, MO. et al.
Genome Biol 2025 July 29. doi 10.1186/s13059-025-03673-9
