Skip to content

Output Layout

Ali Altintas edited this page Aug 27, 2026 · 6 revisions

Output Layout

results/
├── fastq/{sample}_R{1,2}.fastq.gz                  # only for lane/run-split samples:
│                                                    #   concatenated lanes
├── fastqc/raw/{sample}_R{1,2}_fastqc.zip           # always-on FastQC of the raw input
├── trimming/                                       # only if trimming is enabled:
│   ├── {sample}_val_{1,2}.fq.gz                    #   trimmed reads (paired)
│   ├── {sample}_trimmed.fq.gz                      #   trimmed reads (single-end)
│   ├── {sample}_*_fastqc.html/.zip                 #   FastQC (run inside TrimGalore!)
│   └── {sample}_*_trimming_report.txt              #   TrimGalore! report
├── star_index/                                     # generated STAR genome index
├── star_pass1/{sample}_SJ.out.tab                  # only if star.two_pass: cohort:
│                                                    #   per-sample pass-1 junctions (BAM-less)
├── star_pass1/merged_SJ.out.tab                    #   pooled/filtered novel junctions
├── reference/                                      # generated annotation tracks:
│   ├── annotation.{genePred,bed12}                 #   RSeQC gene model (BED12)
│   ├── gene_id_to_name.tsv.gz                      #   gene_id -> gene_name lookup
│   ├── genes.bed                                   #   only if a chimera screen is enabled:
│   ├── exons.bed                                   #     BED6 tracks the breakpoint tests
│   └── te.bed                                      #     run against (see below)
├── star/{sample}_Aligned.out.bam                   # unsorted, fed to TEcount
├── star/{sample}_Aligned.sortedByCoord.out.bam(.bai)   # for RSeQC/QC
├── rseqc/{sample}_infer_experiment.txt             # raw RSeQC report
├── rseqc/{sample}_strandedness.txt                 # resolved no/forward/reverse
├── rseqc/strandedness_check_mqc.json               # declared vs inferred, mismatches flagged
├── tecount/{sample}.cntTable                       # per-sample gene+TE counts
├── tecount/counts_matrix.tsv                       # feature x samples (if tetranscripts.qc.enabled)
├── tecount/qc/{pca_transform}_counts.tsv           #   QC-view transformed matrix
├── tecount/qc/pca_{pca_transform}_mqc.json         #   sample-QC PCA (custom content)
├── tecount/qc/heatmap_{pca_transform}_mqc.json     #   sample-QC distance heatmap
├── tecount/qc/tecount_assignment_mqc.json          #   gene-vs-TE summary barplot
├── tecount/qc/tecount_te_class_mqc.json            #   TE class composition barplot
├── tetranscripts/{contrast}_*.{txt,R}              # only if "condition" column present
│                                                    #   ({contrast}.cntTable, _DESeq2.R,
│                                                    #   _gene_TE_analysis.txt, _sigdiff_gene_TE.txt)
├── telocal/                                          # only if telocal.enabled (default: true):
│   ├── locInd                                        #   auto-built TElocal index (if locind empty;
│   │                                                 #   removed when outputs.keep_telocal_index: false)
│   ├── {sample}.cntTable.gz                          #   per-sample locus-level TE counts
│   ├── telocal_locations.bed                         #   TE key -> coordinates, BED6
│   ├── counts_matrix.tsv.gz                          #   locus x samples (if telocal.qc.enabled)
│   └── qc/
│       ├── {pca_transform}_counts.tsv.gz             #   QC-view transformed matrix
│       ├── pca_{pca_transform}_mqc.json              #   sample-QC PCA (custom content)
│       ├── heatmap_{pca_transform}_mqc.json          #   sample-QC distance heatmap
│       ├── telocal_assignment_mqc.json               #   gene-vs-TE summary barplot
│       └── telocal_te_class_mqc.json                 #   TE class composition barplot
├── chimera_junction/                               # only if chimera.junction.enabled (default: true):
│   │                                                #   4 per-sample tables = 2 row-sets x 2 column-sets
│   ├── {sample}_junctions.tsv.gz                    #   base: every junction, all directions
│   ├── {sample}_junctions_te-gene-chimeras.tsv.gz   #     fewer rows: gene<->TE only
│   ├── {sample}_junctions_with-telocal.tsv.gz       #     more columns: + TElocal (if telocal.enabled)
│   ├── {sample}_junctions_te-gene-chimeras_with-telocal.tsv.gz   #  both (if telocal.enabled)
│   ├── telocal_index.pkl.gz                         #   shared TElocal interval index (if telocal.enabled)
│   ├── all_events.tsv.gz                            #   merged event catalog
│   ├── te-gene-chimeras.tsv.gz                      #   merged gene<->TE events only
│   ├── chimera_evidence.tsv.gz                      #   UNIFIED: one row per (gene, TE insertion)
│   │                                                #   pair, both screens joined + confidence tier
│   ├── counts_matrix.tsv.gz                         #   events x samples (if write_counts_matrix)
│   ├── qc/{sample}_junction_qc.tsv.gz               #   per-sample junction summary
│   ├── qc/junction_qc_mqc.json                      #   junction barplot by direction
│   ├── qc/te_gene_chimeras_mqc.json                 #   gene-TE chimeras barplot
│   ├── qc/canonical_rate_mqc.json                   #   canonical rate by direction barplot
│   ├── qc/junction_highlights_mqc.json              #   "what to look at" + ranked candidates
│   ├── qc/{pca_transform}_counts.tsv.gz             #   QC-view transformed matrix
│   ├── qc/pca_{pca_transform}_mqc.json              #   sample-QC PCA (custom content)
│   ├── qc/heatmap_{pca_transform}_mqc.json          #   sample-QC distance heatmap
│   └── igv/{sample}_junctions.bed                   #   IGV track (if write_igv_bed)
├── chimera_assembly/                               # only if chimera.assembly.enabled (default: true):
│   ├── star/{sample}_Aligned.sortedByCoord.out.bam  #   NOTE: a second, dedicated STAR pass
│   │                                                #   (--outSAMstrandField intronMotif); not the
│   │                                                #   main alignment -- budget disk accordingly
│   ├── assembly/{sample}.gtf                        #   per-sample StringTie assembly
│   ├── stringtie_merge.gtf                          #   cross-sample structural union
│   ├── quant/{sample}.transcripts.gtf               #   per-sample re-quantification
│   ├── candidates.tsv.gz                            #   every classified assembled transcript
│   ├── candidates_with_junction_evidence.tsv.gz     #   + cross-check vs the junction screen
│   ├── tpm_matrix.tsv.gz                            #   candidate x sample TPM
│   ├── qc/chimera_assembly_classes_mqc.json         #   candidates by chimera_type
│   ├── qc/chimera_assembly_highlights_mqc.json      #   "what to look at first" + top candidates
│   └── igv/candidates.bed                           #   IGV track (if write_igv_bed)
├── versions/rnaseq_mqc_versions.yml                # pinned tool versions -> MultiQC
├── qc/multiqc_report.html                          # FastQC + STAR + RSeQC (+ tecounts/telocal/chimera QC + summary barplots) + resource usage
└── pipeline_info/
    ├── benchmarks/<rule>/...                       # per-rule CPU/RSS usage (-> MultiQC)
    ├── benchmark_summary_mqc.json                  # "Resource usage" table (see below)
    ├── evidence_overview_mqc.json                  # "Start here" report section
    └── logs/<rule>/...                             # per-rule stdout/stderr

Annotation tracks under results/reference/

These are generated once from your GTFs and are useful on their own — all are plain, uncompressed BED so bedtools and IGV can read them directly.

File Format One row per Name column
annotation.bed12 BED12 transcript transcript id
genes.bed BED6 gene body (min–max over all its GTF features) gene_id
exons.bed BED6 exon the exon's gene_id
te.bed BED9 TE insertion transcript_id (e.g. L1PA2_dup1)

genes.bed, exons.bed and te.bed are built whenever either chimera screen is enabled; they are what the breakpoint and exon-overlap tests are run against. annotation.bed12 is built only when RSeQC strandedness auto-detection needs it.

Gene symbols

Every table this pipeline writes is keyed by gene_id — that is what TEcount and TElocal report, and what all the joins depend on. With an Ensembl or GENCODE annotation that means accessions (ENSMUSG…) and no readable symbol anywhere.

results/reference/gene_id_to_name.tsv.gz is the lookup: two columns, gene_id and gene_name, one row per gene, extracted once from your GTF. Join it against anything — a counts matrix, a chimera table, a DESeq2 result:

m   <- read.delim("results/tecount/counts_matrix.tsv", row.names = 1)
sym <- read.delim("results/reference/gene_id_to_name.tsv.gz", row.names = 1)
rownames(m) <- ifelse(rownames(m) %in% rownames(sym),
                      sym[rownames(m), 1], rownames(m))

gene_name is never blank — a gene with no gene_name attribute falls back to its gene_id, so a join never drops rows or produces unlabelled points in a plot. If the GTF has no gene_name attributes at all (UCSC-style files, where gene_id is already the symbol) the log says so, since a lookup that is silently a no-op is worse than a noisy one.

This is a sidecar rather than an extra column on the counts matrices on purpose: those are read with read.delim(..., row.names = 1) and coerced with as.matrix, so a character column in the middle would turn the whole matrix character and break DESeq2 — and on the default feature_class: TE they hold no gene rows at all.

te.bed extends BED6 with three extra columns — family, class, subfamily (columns 7, 8, 9) — so a locus can be filtered by TE class without a second lookup. Note the name/subfamily split, which mirrors the TE GTF's own convention: column 4 is the individual insertion and joins against TElocal rows and the chimera screens' te_id, while column 9 is the subfamily and joins against TEcount rows. See TElocal for the subfamily-vs-locus distinction.

Everything under input/ (your sample sheet, config, and reference fasta/GTF files) is supplied by you; everything under results/ (the index, gene model, alignments, counts, report, benchmarks, and logs) is generated by the workflow. Per-rule logs mirror the results layout under results/pipeline_info/logs/ (plus results/pipeline_info/logs/config_resolution.log, which records how sjdb_overhang, the decompressed-reference directory, and gzipped reference files were resolved).

Clone this wiki locally