Tutorial
How to download public RNA-seq data and run an analysis on Cheaha, step by step.
If you want to understand how nf-core pipelines work under the hood, read the nf-core Overview first.
Table of contents
Overview
GEO accession ──> fetchngs ──> FASTQs + samplesheet ──> rnaseq ──> counts, QC, reports
We run two pipelines in sequence. nf-core/fetchngs (v1.12.0) downloads the raw data and writes a samplesheet. nf-core/rnaseq (v3.23.0) reads that samplesheet and does the analysis.
Prerequisites
- A Cheaha account (request one here)
- Comfortable with the command line and
sbatch/squeue
Dataset
This example uses GSE79613, a paired-end mRNA-seq dataset from iPSC-derived endothelial cells (Homo sapiens, Illumina HiSeq 2000). It has 11 samples: 3 control, 3 unaffected BMPR2 mutation carriers, and 5 FPAH patients.
Step 0: Clone and set up
ssh <your-blazerid>@cheaha.rc.uab.edu
git clone https://github.com/informaticsclub/nf-core-cheaha-examples.git
cd nf-core-cheaha-examples
Install Nextflow
The Nextflow module on Cheaha (v21.08.0) is too old. nf-core/rnaseq 3.23.0 needs Nextflow 25.04.3 or newer. Run the install script once:
bash scripts/install_nextflow.sh
This puts a ./nextflow binary (v25.10.4) in the repo directory and creates the logs/ folder.
Check that it works:
module load Java
./nextflow -version
Step 1: Download FASTQs with fetchngs
What this step does
- Resolves the GEO accession (
GSE79613) to individual SRA run IDs - Downloads metadata from the ENA (European Nucleotide Archive)
- Downloads FASTQ files using
sratools(prefetch+fasterq-dump) - Generates a samplesheet formatted for nf-core/rnaseq
Input file
The input is input/ids.csv, a text file with one accession per line:
GSE79613
This can be a GEO series, SRA project, or individual run IDs. See the fetchngs docs for supported formats.
Parameters
See params.fetchngs.yml:
input: "input/ids.csv" # One accession per line
outdir: "results/fetchngs" # Where FASTQs and samplesheet go
nf_core_pipeline: "rnaseq" # Format samplesheet for nf-core/rnaseq
download_method: "sratools" # FTP is blocked on Cheaha; sratools uses HTTPS
Why these settings:
download_method: "sratools"— Cheaha compute nodes block FTP. sratools downloads over HTTPS instead.nf_core_pipeline: "rnaseq"— Tells fetchngs to write the samplesheet with columns rnaseq expects (sample,fastq_1,fastq_2,strandedness). Strandedness defaults toauto.
Submit the job
sbatch scripts/run_fetchngs.sh
Monitor progress
# Check if the job is running
squeue -u $USER
# Watch the SLURM log
tail -f logs/fetchngs_*.log
# Check the Nextflow debug log if something goes wrong
less logs/nextflow_fetchngs.log
Expected output
Once complete, you’ll find:
results/fetchngs/
├── fastq/ # Downloaded FASTQ files
│ ├── SRX1603629_SRR3192396_1.fastq.gz
│ ├── SRX1603629_SRR3192396_2.fastq.gz
│ ├── ...
│ └── md5/ # md5 checksums
├── samplesheet/
│ ├── samplesheet.csv # <-- This feeds into Step 2
│ ├── id_mappings.csv
│ └── multiqc_config.yml
├── metadata/
│ ├── GSE79613.runinfo.tsv
│ └── GSE79613.runinfo_ftp.tsv
└── pipeline_info/
The important output is results/fetchngs/samplesheet/samplesheet.csv. This is what rnaseq reads as input in Step 2.
It’s worth opening this file to check that sample names look right. fetchngs uses SRA experiment aliases, which may not match the names in the paper.
Troubleshooting
If metadata/ exists but fastq/ is empty, the downloads likely failed because FTP is blocked. Check that download_method: "sratools" is set in params.fetchngs.yml.
If you see Unknown method invocation 'env', your Nextflow is too old. Re-run bash scripts/install_nextflow.sh to get v25.10.4.
If the job finishes instantly with no output, ./nextflow probably isn’t installed. Run the install script first.
Step 2: Run RNA-seq analysis
What this step does
- Reads the samplesheet from Step 1
- Runs FastQC on raw reads
- Trims adapters with Trim Galore
- Aligns to the GRCh38 reference genome using STAR
- Quantifies gene expression with Salmon
- Generates a MultiQC report
Parameters
See params.rnaseq.yml:
input: "results/fetchngs/samplesheet/samplesheet.csv" # Generated by fetchngs
outdir: "results/rnaseq" # Where results go
genome: "GRCh38" # iGenomes reference (auto-downloaded)
genome: "GRCh38" pulls the GRCh38 reference from iGenomes (genome FASTA, STAR index, GTF annotation). Nextflow downloads and caches these on first use.
Submit the job
Make sure Step 1 has completed successfully before running this:
# Verify the samplesheet exists
cat results/fetchngs/samplesheet/samplesheet.csv
# Submit
sbatch scripts/run_rnaseq.sh
rnaseq is much heavier than fetchngs. STAR needs ~38 GB RAM per sample. The SLURM job requests 48 hours, but actual runtime depends on cluster load.
Monitor progress
squeue -u $USER
tail -f logs/rnaseq_*.log
Expected output
results/rnaseq/
├── fastqc/ # Raw read quality reports
├── trimgalore/ # Adapter-trimmed reads and reports
├── star_salmon/ # STAR alignments + Salmon quantification per sample
├── multiqc/
│ └── multiqc_report.html # <-- Start here for QC overview
├── pipeline_info/ # Execution reports and resource usage
└── ...
Start with the MultiQC report at results/rnaseq/multiqc/multiqc_report.html. It pulls together QC metrics from every step into one HTML page.
Troubleshooting
If you get No such file: samplesheet.csv, Step 1 didn’t finish. Check that results/fetchngs/samplesheet/ exists.
If STAR jobs fail with out-of-memory errors, the Cheaha config will auto-retry with more memory (up to 750 GB).
The first run may be slow while Nextflow downloads the iGenomes reference (~30 GB). It’s cached after that.
The Cheaha profile
Both scripts use -profile cheaha. This loads the Cheaha config from the nf-core/configs repo at runtime. You don’t need a local copy.
It enables Singularity (Cheaha doesn’t have Docker), sets SLURM as the executor so each task is submitted as its own job, and picks the right partition (express, short, medium, long) based on the task’s time request. Resource limits match Cheaha’s max node specs (750 GB RAM, 128 CPUs, 150h). Temp files go to $USER_SCRATCH instead of /tmp.
You shouldn’t need to change any of this. See the Cheaha config docs for details.
Clean up
The work/ directory can get very large (hundreds of GB). Delete it once you’re happy with the results:
rm -rf work .nextflow* logs
Keep results/ as long as you need it.
Using your own data
To run this with a different dataset:
- Put your accession(s) in
input/ids.csv(one per line). - Change
genomeinparams.rnaseq.yml. Common values:GRCh38(human),GRCm39(mouse),BDGP6(fly)- Full list: iGenomes
- If you know your library strandedness, edit it in the samplesheet after fetchngs runs. Otherwise leave it as
auto. - If memory is tight, add
aligner: "hisat2"toparams.rnaseq.yml(uses less RAM than STAR).
Links
- nf-core Overview (pipeline structure, config, work directory)
- fetchngs usage / output
- rnaseq usage / output
- Cheaha config docs
- Nextflow docs