WulfRNA is a packaged CLI for a focused bulk RNA-seq workflow on paired-end (default) or single-end FASTQ input.
Current outputs:
- source-qualified, gene-level expected counts and TPM from Salmon or kallisto
- optional STAR count and WulfRNA-calculated gene-level TPM matrices
- optional coordinate-sorted STAR BAM and BAI
- STAR splice-junction and gene-count outputs
- final MultiQC report
Pipeline steps: FastQC (raw) → Cutadapt → FastQC (trimmed) → optional STAR alignment → transcript quantification (Salmon or kallisto) → gene-level aggregation → MultiQC.
Public-readiness note: WulfRNA v0.2.2 is a lightweight single-server bulk RNA-seq runner intended for local or HPC workstation use.
WulfRNA does not install analysis binaries for you. They must already be installed and visible in PATH at runtime.
Required commands:
bashpython3fastqccutadaptmultiqcsalmon(default backend) orkallisto(optional backend, when selected)STARandsamtools(optional, required only when--aligner staris selected)
Useful standard utilities expected on Linux nodes:
gzip,zcat,awk,sed,grep,sort,head,tail
Use Python 3.10+ and a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install .This installs the wulfrna command.
WORKDIR must contain fastq/ and uses an explicit input layout:
sample_id_R1.fastq.gzsample_id_R2.fastq.gz
sample_id.fastq.gzorsample_id_R1.fastq.gz*_R2.fastq.gzfiles are not allowed in single-end mode (run fails if present).
--reference must point to a directory containing backend-specific resources plus a shared tx2gene map:
- shared:
combined_tx2gene.tsv - shared:
combined_gene_annotation.tsv, with columnsgene_id,GeneName, and positive integergene_length_bp(the union length of annotated exons, counting overlaps once) - Salmon backend:
salmon_index/ - kallisto backend:
kallisto_index/combined_transcripts.kidx - STAR aligner (when
--aligner star):star_index/containing non-emptyGenome,SA,SAindex,genomeParameters.txt,chrName.txt,chrLength.txt, andchrNameLength.txt
Generate combined_gene_annotation.tsv from the same GTF used to build the
STAR index and combined_tx2gene.tsv:
python scripts/build_gene_annotation.py \
--gtf /path/to/combined.gtf \
--output /path/to/reference/combined_gene_annotation.tsvThe builder reads exon records, preserves each GTF gene_id exactly, merges
overlapping or adjacent exon intervals within a gene, and writes their union
length as gene_length_bp. It uses gene_name for GeneName and writes NA
when no symbol exists. A gene assigned to multiple chromosomes, inconsistent
gene names, malformed records, or invalid coordinates cause a clear failure.
Use the identical combined GTF for all reference artifacts so gene IDs match
between this table, combined_tx2gene.tsv, and STAR.
wulfrna run WORKDIR --reference /path/to/reference --stranded reverse --threads 16Arguments:
WORKDIR(positional): working directory containingfastq/--reference PATH(required): prepared reference directory--stranded {none|forward|reverse}(required): library strandedness- Salmon mapping:
none -> IU,forward -> ISF,reverse -> ISR - kallisto mapping:
none -> (unstranded default),forward -> --fr-stranded,reverse -> --rf-stranded
- Salmon mapping:
--threads N(required): total threads (N >= 1)--quantifier {salmon|kallisto}(optional, defaultsalmon)--aligner {none|star}(optional, defaultnone): run STAR alignment from trimmed FASTQs and write isolated alignment outputs underalign/star/<sample>/; Salmon/kallisto quantification and abundance matrices are still produced normally--single-end,--SE(optional): switch layout frompaired_endtosingle_end--fragment-length FLOATand--fragment-sd FLOAT(single-end kallisto only; both required and must be> 0)--min-mapping-rate FLOAT(optional, default0.90): minimum acceptable tx2gene transcript mapping rate per sample (0.0-1.0)--dry-run(optional): validate tools/reference/inputs, write metadata/status, then exit--genome NAME(optional): resolve references as<reference>/<NAME>/...--no-resume(optional): disable phase-level resume and rerun all phases--force-from {fastqc_raw,cutadapt,fastqc_trimmed,align,quant,aggregate,multiqc}(optional): force rerun from the selected phase onward
Backward-compatibility note: legacy invocation without explicit run is still accepted, but wulfrna run ... is the intended interface.
pip install -e .
wulfrna --help
wulfrna run <workdir> --reference <reference_dir> --stranded reverse --threads 4 --dry-run
wulfrna run <workdir> --reference <reference_dir> --stranded reverse --threads 4 --quantifier kallisto --dry-run
wulfrna run <workdir> --reference <reference_dir> --stranded reverse --threads 4 --aligner star --dry-runNotes:
- For dry-run to pass, required binaries must be in
PATH, references must be complete for the selected quantifier and optional aligner, and<workdir>/fastqmust contain valid FASTQ inputs for the selected layout (paired_endorsingle_end). - Single-end examples:
- Salmon:
wulfrna run WORKDIR --reference REFDIR --stranded reverse --threads 4 --single-end --dry-run - kallisto:
wulfrna run WORKDIR --reference REFDIR --stranded reverse --threads 4 --single-end --quantifier kallisto --fragment-length 200 --fragment-sd 20 --dry-run
- Salmon:
Expected primary outputs on full success:
abundance/<quantifier>_gene_expected_counts.tsvabundance/<quantifier>_gene_tpm.tsvabundance/gene_expected_counts.tsv(legacy v0.2.x compatibility output withoutGeneName)abundance/gene_tpm.tsv(legacy v0.2.x compatibility output withoutGeneName)multiqc/multiqc_report.htmllogs/tx2gene_mapping_stats.tsv
Additional outputs when --aligner star is selected (per sample):
align/star/<sample>/Aligned.sortedByCoord.out.bamalign/star/<sample>/Aligned.sortedByCoord.out.bam.baialign/star/<sample>/SJ.out.tabalign/star/<sample>/ReadsPerGene.out.tabalign/star/<sample>/Log.final.outabundance/star_gene_counts/<sample>.star.ReadsPerGene.out.tab(metadata-preserving copy)abundance/star_gene_counts.tsvabundance/star_gene_tpm.tsv
New matrices begin with gene_id, GeneName, then deterministically sorted sample columns. Salmon/kallisto TPM is summed from transcript-quantifier output. In contrast, star_gene_tpm.tsv is WulfRNA-calculated gene-level TPM from STAR counts using exon-union lengths from combined_gene_annotation.tsv; it is not a native STAR output. STAR's count column is selected from --stranded (none: column 2, forward: column 3, reverse: column 4). STAR TPM values are serialized with six decimal places, then each serialized sample column is required to sum to 1,000,000 within an absolute tolerance of 0.01.
Matrix behavior note:
- Gene-level matrices include only genes observed in the transcript quantification input (unobserved zero-only genes are not emitted).
Status files in WORKDIR/status/:
- during run:
RUNNING - full success:
SUCCESS,finished_at.txt,summary.txt - dry-run success:
DRY_RUN_OK,finished_at.txt,summary.txt - failure:
FAILED,failed_step.txt(and optionallyfailed_sample.txt),summary.txt - phase checkpoint markers:
status/steps/<phase>.donefor each completed phase - run compatibility manifest:
status/manifest.json
By default, wulfrna run ... automatically resumes at the phase level (not sample-level).
Phases:
fastqc_rawcutadaptfastqc_trimmedalign(only when--aligner star)quantaggregatemultiqc
A phase is skipped only when:
status/steps/<phase>.doneexists, and- expected outputs for that phase exist and are non-empty, and
status/manifest.jsonis compatible with the current run configuration.
Conservative compatibility rules:
- If sample IDs changed: resume is blocked with an error.
- If input layout changed (
paired_endvssingle_end): automatic resume is blocked with an error. - If
quantifier,reference_dir, orstrandedchanged:quantand downstream phases rerun. - If
aligneror STAR index content changed:alignand downstream phases rerun when STAR alignment is enabled. - If
combined_tx2gene.tsvfingerprint changed:aggregateandmultiqcrerun. - If
combined_gene_annotation.tsvfingerprint changed:aggregateandmultiqcrerun. - If only thread count changed: resume is allowed.
To fully disable resume:
wulfrna run WORKDIR --reference REFDIR --stranded reverse --threads 16 --no-resumeTo rerun only aggregation/reporting after fixing combined_tx2gene.tsv:
- preferred:
--force-from aggregate, or - remove aggregate + multiqc outputs and rerun.
Example:
wulfrna run WORKDIR --reference REFDIR --stranded reverse --threads 16 --force-from aggregateIf you use WulfRNA in your research, please cite:
Kudoh, F. (2026). WulfRNA (Version 0.2.2) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.21409117
Citation metadata is also available in CITATION.cff.
