8000 GitHub - CCICB/nf-carbonite at development · GitHub
[go: up one dir, main page]

Skip to content
8000

About

RNA-seq analysis pipeline

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

nf-carbonite

A comprehensive RNA-Seq analysis pipeline built with Nextflow for processing RNA sequencing data through multiple analysis tools including alignment, fusion detection, variant calling, and specialized analyses for hematological malignancies.

Overview

nf-carbonite performs end-to-end RNA-Seq analysis with the following key features:

  • Read alignment with STAR
  • Gene expression quantification with RSEM
  • Fusion detection with STAR-Fusion and Arriba
  • Variant calling with GATK HaplotypeCaller and FreeBayes
  • Specialized hematological analyses with ALLSorts and TALLSorts
  • Transposable element analysis with TEtranscripts
  • Immune profiling with MiXCR
  • Isoform analysis with Isofox
  • Novel splice junction detection with MINTIE

Quick Start

  1. Install Nextflow (>=24.10.0)
  2. Clone the repository:
    git clone git@github.com:CCICB/nf-carbonite.git
    chmod +x nf-carbonite/bin/*
  3. Prepare your samplesheet (samples.csv)
  4. Configure parameters (params.yaml)
  5. Run the pipeline

Requirements

System Requirements

  • Nextflow (>=24.10.0)
  • Container system: Docker or Singularity
  • Reference files: See Configuring Parameters section

Tip

Parameters and the samplesheet are validated against a schema before anything runs, so bad input fails immediately with a clear message. Run the pipeline with --help for a full parameter listing. See docs/usage.md for details, including a note on pre-installing the nf-schema plugin for offline HPC systems.

Compatible Environments

Successfully tested on:

  • Pawsey Supercomputing Centre
  • NCI Gadi
  • Azure Virtual Machines

Input Preparation

Sample Sheet Format

--input takes a CSV with a header row and one row per sample:

rnaseq_id,directories
ABC123,/path/to/fastq/files/ABC123
XYZ987,/path/to/fastq/files/XYZ987
DEF456,/path/to/fastq/files/DEF456
Column Description
rnaseq_id Unique sample identifier. No spaces. Used as the prefix for all output files.
directories Path to an existing directory containing that sample's FASTQ files (*_R1*.gz / *_R2*.gz, paired-end).

The samplesheet is validated against assets/schema_input.json before anything runs: missing columns, duplicate IDs, or non-existent directories fail immediately with a clear message.

Configuring Parameters

Create a params.yaml file with your reference files and analysis options. The file should contain both mandatory and optional parameters as described below.

Mandatory Parameters

These parameters are required for the pipeline to run:

# Mandatory reference files (all required)
genome_lib_dir: /path/to/ref/files/38/ctat_genome_lib_build_dir     # Path to STAR genome library directory
star_dir: /path/to/ref/files/38/STAR                               # Path to STAR reference directory  
gtf_file: /path/to/ref/files/38/gencode.v41.annotation.gtf         # Path to gene annotation GTF file
ensg2hgnc_file: /path/to/ref/files/38/gencode_v41_ensg_hgnc.csv     # Path to ENSG to HGNC gene mapping file

# Pipeline config
8000
uration (optional - defaults shown)
reference_name: 'GRCh38_no_alt_analysis_set'  # Prefix of your .fa file (default: 'GRCh38_no_alt_analysis_set')
ref_genome_version: 'hs38'                     # Reference genome version: 'hs38' or 'hg19' (default: 'hs38')

Optional Parameters

These parameters are optional. If not provided, the corresponding analysis will be skipped:

# Optional reference files (omit any you don't want to use)
rnaindel_dir: /path/to/ref/files/38/data_dir_grch38                 # RNA-indel data directory (skips RNAINDEL if omitted)
ensembl_data_dir: /path/to/ref/files/38/ensembl                     # Ensembl data directory (skips ISOFOX if omitted)  
mixcr_license: /path/to/ref/files/38/mi.license                     # MiXCR license file (skips MIXCR if omitted)
te_gtf_file: /path/to/ref/files/38/GRCh38_GENCODE_rmsk_TE.gtf       # Transposable element GTF file (skips TECOUNT if omitted)
freebayes_interval_list: /path/to/ref/files/38/pathogenic_snps.bed  # Interval list for targeted analysis (skips FREEBAYES if omitted)
mintie_dir: /path/to/ref/files/mintie-0.3.9-0/ref                  # MINTIE reference directory (skips MINTIE if omitted)
annovar_dir: /path/to/ref/files/38/annovar                          # ANNOVAR data directory (skips ANNOVAR if omitted)
gatk_interval_list: /path/to/ref/files/38/gatk.interval_list        # GATK interval list (skips GATK_HAPLOTYPECALLER if omitted)

Note

  • hs38 mode only: FreeBayes, Isofox, and MINTIE are only available when using ref_genome_version: 'hs38'
  • File formats: GTF files can be compressed (.gtf.gz), BED files can be compressed (.bed.gz)
  • Analysis skipping: Any optional parameter you omit will skip the corresponding analysis tool

Complete params.yaml Example

# Mandatory parameters
genome_lib_dir: /path/to/ref/files/38/ctat_genome_lib_build_dir
star_dir: /path/to/ref/files/38/STAR
gtf_file: /path/to/ref/files/38/gencode.v41.annotation.gtf
ensg2hgnc_file: /path/to/ref/files/38/gencode_v41_ensg_hgnc.csv

# Optional parameters (include only what you need)
rnaindel_dir: /path/to/ref/files/38/data_dir_grch38
ensembl_data_dir: /path/to/ref/files/38/ensembl
mixcr_license: /path/to/ref/files/38/mi.license
te_gtf_file: /path/to/ref/files/38/GRCh38_GENCODE_rmsk_TE.gtf
freebayes_interval_list: /path/to/ref/files/38/pathogenic_snps.bed
mintie_dir: /path/to/ref/files/mintie-0.3.9-0/ref
annovar_dir: /path/to/ref/files/38/annovar
gatk_interval_list: /path/to/ref/files/38/gatk.interval_list

Running the Pipeline

Basic Command

nextflow run /path/to/nf-carbonite \
  --input /path/to/samples.csv \
  --outdir /path/to/outputs \
  --reference_name 'GRCh38_no_alt_analysis_set' \
  --ref_genome_version hs38 \
  -params-file /path/to/params.yaml \
  -profile docker \
  -resume

Command Line Arguments

Required Arguments

Argument Type Description
--input String Path to the sample sheet CSV file
--outdir String Output directory for results (must exist)
--reference_name String Prefix of your reference FASTA file
--ref_genome_version String Genome version: hs38 or hg19
-params-file String Path to your params.yaml configuration file
-profile String Execution profile: docker, singularity, local, etc.

Optional Arguments

Argument Type Description Default
-resume Boolean Resume previous run using cached results false
-w String Working directory for temporary files Current directory
-c String Additional Nextflow config file (not for parameters) None

Advanced Usage

# With custom working directory and additional config
nextflow run /path/to/nf-carbonite \
  --input samples.csv \
  --outdir results \
  --reference_name 'GRCh38_no_alt_analysis_set' \
  --ref_genome_version hs38 \
  -params-file params.yaml \
  -profile singularity \
  -c custom.config \
  -w /scratch/work_dir \
  -resume

Warning

Parameter Configuration: Always provide pipeline parameters via -params-file or CLI options. Custom config files (-c) should only contain execution settings, not analysis parameters. See Nextflow configuration docs for details.

Analysis Tools

The pipeline integrates multiple specialized tools organized by analysis type:

Core RNA-Seq Analysis

  • STAR (v2.7.8a) - Read alignment
  • RSEM (v1.3.3) - Gene expression quantification
  • Picard (v2.25.7) - BAM processing and metrics

Fusion Detection

  • STAR-Fusion (v1.12.0) - Fusion transcript detection
  • Arriba (v2.4.0) - Additional fusion calling

Variant Analysis

Specialized Analyses

  • ALLSorts (v0.2.0) - Acute lymphoblastic leukemia classification
  • TALLSorts - T-cell acute lymphoblastic leukemia subtyping
  • MiXCR (v4.3.2) - Immune repertoire analysis
  • Isofox (v1.7.1) - Isoform expression (hs38 only)
  • TEtranscripts (v2.2.1) - Transposable element analysis
  • MINTIE (v0.3.9) - Novel splice variant detection (hs38 only)

Note

hs38-only tools: FreeBayes, Isofox, and MINTIE analyses are only available when using ref_genome_version: 'hs38'

Profiles

Profile Purpose
docker Run all processes in Docker containers
singularity Run all processes in Singularity containers
test Bundled dummy data for smoke-testing the pipeline wiring
local Small local overrides
nci, pawsey Site profiles for NCI Gadi and Pawsey Setonix (edit the <project_id> placeholders first)
cavatica, tower, s3, arm, debug Platform-specific settings

Testing

A fast smoke test of the workflow wiring, using the bundled dummy data and process stubs (no containers or real reference files needed). Run from the repository root:

nextflow run . -profile test -stub-run --outdir test_results

With nf-test installed, the same check runs as an assertion-based test via nf-test test.

Resource handling

Default per-process resources live in conf/base.config. Processes that fail with out-of-memory or other transient errors (exit codes 130–145, 104) are retried up to twice with escalating memory. resourceLimits caps requests so retries never exceed what the environment can schedule; site profiles override the cap for their clusters. Tools take their thread counts from task.cpus, so overriding cpus in a config automatically adjusts tool threading.

Documentation

Each run also writes pipeline_info/software_versions.yml to the output directory, recording the version of every tool that actually executed.

Credits & 6668 amp; Acknowledgments

This pipeline was developed by CCI using nf-core/rnaseq as the foundation template.

Funding

Development of nf-carbonite has been supported by:

  • MRFF - Medical Research Future Fund
  • NHMRC - National Health and Medical Research Council
  • Minderoo Foundation
  • Luminesce Alliance
  • NSW Health
  • CINSW - Cancer Institute NSW
  • Australian Government Research Training Program
  • Cure Brain Cancer Foundation
  • Bioplatforms Australia (enabled by NCRIS), NCI and Pawsey Supercomputing Research Centre

About

RNA-seq analysis pipeline

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0