Skip to content

About

Dual-track Nextflow DSL2 bulk RNA-seq workflows (FastQC, Trim Galore, HISAT2 + StringTie v3.0.3, and Kallisto v0.51.1) with Docker integration and hardware-aware WSL2 resource configs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Nextflow DSL2 Bulk RNA-seq Orchestration Pipelines

Nextflow Containerized License: MIT

Modular, scalable Nextflow DSL2 workflows orchestrating quality control, read trimming, splice-aware genomic alignment, transcript assembly, and pseudoalignment for paired-end bulk RNA sequencing cohorts of arbitrary size.


Architecture Overview

                        [ Paired-End FASTQ Reads ]
                                     │
                    ┌────────────────┴────────────────┐
                    ▼                                 ▼
             [ FastQC: Raw ]                 [ Trim Galore ]
                                                      │
                    ┌─────────────────────────────────┴────────────────────────┐
                    ▼                                                          ▼
      [ Track 1: Alignment-Based ]                               [ Track 2: Alignment-Free ]
                    │                                                          │
                    ▼                                                          ▼
          [ HISAT2: Alignment ]                                       [ Kallisto: Quant ]
                    │                                                          │
                    ▼                                                          ▼
          [ Sorted, Indexed BAMs ]                                    [ abundance.h5/tsv ]
                    │                                                          │
                    ▼                                                          ▼
        [ StringTie: Assembly ]                                       [ tximport in R ]
                    │                                                          │
                    └─────────────────────────────────┬────────────────────────┘
                                                      │
                                                      ▼
                                       [ Dual-Track Reconciliation ]

Repository Structure

.
├── workflows/
│   ├── step1_fastqc.nf                 # Raw sequence QC with FastQC & MultiQC
│   ├── step2_trimgalore.nf             # Automated adapter & quality trimming with TrimGalore
│   ├── step3_hisat2_pilot.nf           # Small-cohort verification pilot alignment
│   ├── step3_hisat2_prod.nf            # Full cohort splice-aware alignment (HISAT2 + Samtools)
│   ├── step3_hisat2_prod_fast.nf       # High-throughput optimized alignment pipeline
│   ├── step4_stringtie.nf              # Transcript quantification with StringTie (Track 1)
│   └── step5b_kallisto.nf              # Pseudoalignment & quantification with Kallisto (Track 2)
├── configs/
│   ├── nextflow.config                 # Default container execution configuration
│   ├── pilot_nextflow.config           # Resource allocation for pilot verification
│   ├── prod_nextflow.config            # Standard production resource configuration
│   ├── prod_fast_nextflow.config       # Performance-tuned multi-threaded configuration
│   ├── stringtie_nextflow.config       # Container & CPU bindings for StringTie
│   └── kallisto_nextflow.config        # Memory & thread allocation for Kallisto
├── runners/
│   ├── run_prod_cmd1.sh                # Production HISAT2 alignment wrapper
│   ├── run_prod_fast_handoff.sh        # Fast HISAT2 alignment wrapper
│   ├── run_step4_cmd1.sh               # StringTie directory initialization
│   ├── run_step4_cmd2.sh               # StringTie execution wrapper
│   ├── run_step4_rebuild_and_run.sh    # StringTie container build and pipeline launch
│   ├── run_track2_cmd1.sh              # Kallisto index generator & container build
│   └── run_track2_cmd2.sh              # Kallisto pseudoalignment execution wrapper
└── samplesheets_templates/
    ├── samplesheet_fastq_template.csv  # 4-sample synthetic FASTQ manifest template
    └── samplesheet_bam_template.csv    # 4-sample synthetic BAM manifest template

Samplesheet Formats

1. FASTQ Manifest (samplesheets_templates/samplesheet_fastq_template.csv)

sample_id,cohort,condition,strandedness,fastq_1,fastq_2
SAMPLE_01,Cohort_A,Case,RF,./data/trimmed/SAMPLE_01_R1.fq.gz,./data/trimmed/SAMPLE_01_R2.fq.gz
SAMPLE_02,Cohort_A,Control,RF,./data/trimmed/SAMPLE_02_R1.fq.gz,./data/trimmed/SAMPLE_02_R2.fq.gz
SAMPLE_03,Cohort_B,Case,unstranded,./data/trimmed/SAMPLE_03_R1.fq.gz,./data/trimmed/SAMPLE_03_R2.fq.gz
SAMPLE_04,Cohort_B,Control,unstranded,./data/trimmed/SAMPLE_04_R1.fq.gz,./data/trimmed/SAMPLE_04_R2.fq.gz

2. BAM Manifest (samplesheets_templates/samplesheet_bam_template.csv)

sample_id,cohort,condition,strandedness,bam,bai
SAMPLE_01,Cohort_A,Case,RF,./results/alignment/SAMPLE_01.sorted.bam,./results/alignment/SAMPLE_01.sorted.bam.bai
SAMPLE_02,Cohort_A,Control,RF,./results/alignment/SAMPLE_02.sorted.bam,./results/alignment/SAMPLE_02.sorted.bam.bai
SAMPLE_03,Cohort_B,Case,unstranded,./results/alignment/SAMPLE_03.sorted.bam,./results/alignment/SAMPLE_03.sorted.bam.bai
SAMPLE_04,Cohort_B,Control,unstranded,./results/alignment/SAMPLE_04.sorted.bam,./results/alignment/SAMPLE_04.sorted.bam.bai

Quick Start & Execution Examples

1. Raw Read Quality Control (FastQC + MultiQC)

nextflow run workflows/step1_fastqc.nf \
    -c configs/nextflow.config \
    --samplesheet "samplesheets_templates/samplesheet_fastq_template.csv" \
    --outdir "./results/01_fastqc"

2. Read Quality & Adapter Trimming (Trim Galore)

nextflow run workflows/step2_trimgalore.nf \
    -c configs/nextflow.config \
    --samplesheet "samplesheets_templates/samplesheet_fastq_template.csv" \
    --outdir "./results/02_trimmed"

3. Track 1: Splice-Aware Alignment (HISAT2)

nextflow run workflows/step3_hisat2_prod.nf \
    -c configs/prod_nextflow.config \
    --samplesheet "samplesheets_templates/samplesheet_fastq_template.csv" \
    --hisat2_index "/path/to/hisat2_index/genome_tran" \
    --outdir "./results/03_alignment"

4. Track 1: Transcript Assembly & Quantification (StringTie)

nextflow run workflows/step4_stringtie.nf \
    -c configs/stringtie_nextflow.config \
    --samplesheet "samplesheets_templates/samplesheet_bam_template.csv" \
    --gtf "/path/to/annotation.gtf" \
    --outdir "./results/04_stringtie"

5. Track 2: Alignment-Free Pseudoalignment (Kallisto)

nextflow run workflows/step5b_kallisto.nf \
    -c configs/kallisto_nextflow.config \
    --samplesheet "samplesheets_templates/samplesheet_fastq_template.csv" \
    --index "/path/to/kallisto.idx" \
    --outdir "./results/05_kallisto"

About

Dual-track Nextflow DSL2 bulk RNA-seq workflows (FastQC, Trim Galore, HISAT2 + StringTie v3.0.3, and Kallisto v0.51.1) with Docker integration and hardware-aware WSL2 resource configs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages