Skip to content

File formats

What tinymapper reads, and what a run writes: its outputs, its statistics, its log and its report.

Reads

--sample (and --input) is a path prefix: tinymapper finds the FASTQ files that start with it. It looks for a pair first, both files of which must exist, in this order:

R1 R2
<prefix>_R1.fq.gz <prefix>_R2.fq.gz
<prefix>_R1.fastq.gz <prefix>_R2.fastq.gz
<prefix>_nxq_R1.fq.gz <prefix>_nxq_R2.fq.gz
<prefix>_nvq_R1.fq.gz <prefix>_nvq_R2.fq.gz
<prefix>.end1.fq.gz <prefix>.end2.fq.gz
<prefix>.end1.gz <prefix>.end2.gz
<prefix>…_S<n>_R1….gz, Illumina's, if one file matches <prefix>…_S<n>_R2….gz

Without a pair, it maps single-end reads, from the first of <prefix>_R1.fq.gz, <prefix>_R1.fastq.gz, <prefix>_nxq_R1.fq.gz, <prefix>_nvq_R1.fq.gz, <prefix>.fq.gz and <prefix>.fastq.gz. The log says which files it found, as a warning when they are not the first pair.

Mode Single-end reads
ChIP-seq Yes, with or without an input. A spike-in calibration needs pairs.
RNA-seq Yes: the stranded tracks are made too.
ATAC-seq Yes: MACS3 calls the peaks with --format BAM instead of BAMPE.
MNase-seq Yes: a single CPM track, without the fragment-size window nor the nucleosome tracks.
shotgun Yes. --as-single-end maps the R1 and R2 of a pair each as single-end reads.
Hi-C No: pairs only.

Single-end runs, but RNA-seq's, need --extend-reads, the fragment length to which the tracks extend the reads.

The genome

--genome is a path prefix too: <prefix>.fa, with the indexes of the aligners beside it (Installation). <prefix>.chrom.sizes is made from the FASTA's index when it is missing.

The output directory

A run writes under --output (by default results/), each file in a folder of its sample:

<output>/
├── <sample>.report.txt           the report of the run (below)
├── <sample>.report_mqc.yaml
├── <sample>.report.html
├── bam/genome/<sample>/          filtered BAM files, and their index
├── bam/spikein/<sample>/         BAM files on the spike-in genome (ChIP-seq, --calibration)
├── tracks/<sample>/              bigWig tracks, CPM-normalised
├── peaks/<sample>/               MACS3's peaks (ChIP-seq, ATAC-seq)
├── pairs/<sample>/               hicstuff's pairs and fragments (Hi-C)
├── plots/<sample>/               hicstuff's plots, and the distance law (Hi-C)
├── matrices/<sample>/            contact maps, and hicstuff's report (Hi-C)
├── stats/<sample>/               statistics, under the sample's name (below)
├── logs/                         the log of each run (below)
└── tmp/                          temporary files, removed at the end of a run

Several runs, of one sample or of several, can share an output directory: every file of a run carries its hash, six letters and digits drawn for the run (K67NGQ), which the log's header and the report give.

File names

A run names its files <sample>^<operation>^…^<hash>.<ext>: the sample's name (the base name of --sample), what was done to the reads, in order, then the run's hash. In a ChIP-seq run of JS001 with the hash K67NGQ:

File What it holds
bam/genome/JS001/JS001^mapped_R64-1-1^filtered^K67NGQ.bam The reads mapped to the genome R64-1-1, filtered: the BAM the tracks and the peaks are made from.
bam/genome/JS001/JS001^mapped_R64-1-1^K67NGQ.sam Before filtering: removed at the end of the run, unless --keepIntermediate.
bam/genome/JS001/JS001^unmapped_CBS138^mapped_R64-1-1^filtered^K67NGQ.bam With --calibration CBS138: the reads that did not map to the spike-in genome, mapped to the genome.
tracks/JS001/JS001^mapped_R64-1-1^K67NGQ.CPM.bw The coverage, in counts per million mapped reads.
tracks/JS001/JS001^mapped_R64-1-1^K67NGQ.vs-JS001_input.bw With --input JS001_input: the sample over its input (bamCompare, ratio).
tracks/JS001/JS001^mapped_R64-1-1^K67NGQ.vs-JS001_input.log2.bw The same, as a log2 ratio.
tracks/JS001/JS001^unmapped_CBS138^mapped_R64-1-1^K67NGQ.CPM.calibrated.bw With --calibration: the coverage scaled by the spike-in's occupancy ratio.
peaks/JS001/JS001_vs-JS001_input_genome-R64-1-1_K67NGQ_peaks.narrowPeak MACS3's peaks, with its _peaks.xls and _summits.bed. Without an input: JS001_genome-R64-1-1_K67NGQ_peaks.narrowPeak.

The other modes add their own:

Mode Files
RNA-seq <sample>^mapped_<genome>^<hash>.bam, STAR's alignments, beside STAR's .Log.out, .Log.progress.out and .SJ.out.tab; the tracks .unstranded.CPM.bw, .fwd.CPM.bw and .rev.CPM.bw.
MNase-seq …^filtered^<min>-<max>^<hash>.bam, the fragments of --MNaseSizes, and …^filtered^40bp^<hash>.bam, their central 40 bp; three tracks of the fragments of --MNaseSizes: .<min>-<max>.CPM.bw, their coverage, .nucpos.CPM.bw, the nucleosomes' positions (bamCoverage --MNase), and .nuccov.CPM.bw, the fragments centred (--centerReads).
Hi-C bam/genome/<sample>/…^<hash>.fwd.bam and .rev.bam, the reads of each side; pairs/<sample>/…^<hash>.valid_idx_pcrfree.pairs.gz, the pairs without duplicates (valid_idx_filtered or valid_idx with other hicstuff options), and .frags.tsv; matrices/<sample>/…^<hash>.cool and .mcool, the contact map at --binning and at coarser resolutions; plots/<sample>/…^<hash>.distance_law.pdf and .tsv; a CPM coverage track.

While a run goes on

A run marks itself with an empty file, <output>/<YYMMDD>-<sample>_<hash>_INPROGRESS, which it removes at its end, whether it succeeded or failed. A run that failed removes the files it wrote, unless --keepIntermediate; its log, which says why, stays.

Statistics

At its end, a run keeps the statistics of the sample, and of a ChIP-seq run's input, in stats/<name>/, under the name alone, so that MultiQC's modules name their rows after the sample. The next run of the sample replaces them.

File Written by What it holds MultiQC module
<name>.flagstat.txt samtools flagstat The alignments before filtering: the reads, and how many mapped. Samtools
<name>.stats.txt samtools stats The filtered BAM: the reads kept, their duplicates, their fragments' sizes. Samtools
<name>.markdup.txt samtools markdup -f The duplicates found among the mapped reads. Samtools
<name>.counts.txt tinymapper Its own counts, a name and a number per line: reads_counted and reads_in_peaks (ChIP-seq, ATAC-seq), forward and reverse (RNA-seq).
<name>.Log.final.out STAR STAR's summary (RNA-seq). STAR

MACS3's _peaks.xls stays under its name, in peaks/<sample>/: the run writes the sample's name on its # name = line, which MultiQC's MACS2 module names its row after. A ChIP-seq run with --calibration also writes its counts on each genome, in stats/sample-<sample>_input-<input>_genome-<genome>_calibration-<spikein>_<hash>.counts.tsv: a name and a number per line, the filtered reads of the sample and of the input on each genome, then the occupancy ratio (ORI) and the calibrated track's scaling factor (Scaling).

A Hi-C run keeps none of these: hicstuff's report holds its numbers.

Logs

Each run writes its log in logs/, named after the sample and the second it started, <sample>.tinymapper_<YYYYMMDDHHMMSS>.log, beside the programs' own messages, <sample>.tinymapper_<YYYYMMDDHHMMSS>.err. Two runs of a sample that start in the same second do not share a log: the second waits for the next.

The log starts with a header, as hicstuff's does: ## key: value lines, then ---. It gives the version, the date, the command line, the run's hash, then every option of the command line, by its long name, as given or by default:

## tinymapper: v0.15.0 log file
## date: 2026-12-05 23:05:55
## cmd: tinymapper -m ChIP -s tests/testChIP -i tests/testChIP.input -g tests/R64-1-1/R64-1-1 -c tests/CBS138/CBS138 -t 4 -o results
## hash: K67NGQ
## mode: ChIP
## sample: tests/testChIP
…
## dry-run: false
---
2026-12-05,23:05:55 :: INFO :: tinymapper v0.15.0: ChIP run K67NGQ of tests/testChIP
…
2026-12-05,23:07:07 :: INFO :: Pipeline completed successfully: BAM files, tracks, peaks and report written after 0h 1m 12s

Each command the run runs is logged, after [EXEC]. The last line says what the run wrote and how long it took; a run that failed ends with Pipeline failed: <why>. A Hi-C run also has hicstuff's log, <sample>^<hash>.hicstuff_<YYYYMMDDHHMMSS>.log, at the root of the output directory.

Until 0.15.0, the log was logs/<YYMMDD>-<sample>_<hash>.log, and the hash was in its name: it is in the header now (Changelog).

The report of a run

A run writes its report at its end, in the output directory, named after the sample; tinymapper-report writes it again from what the run left. It reads the log's header, the statistics, the peaks and, for a Hi-C run, hicstuff's report, and runs no program. A run that failed, and a dry run, write none.

  • <sample>.report.txt: every number of the report, for scripts;
  • <sample>.report_mqc.yaml: the sample's row of MultiQC's General Statistics table;
  • <sample>.report.html: a page to read the run with.

A sample's report is of its newest run. Its format has a version, format_version, which changes when a key, a unit or a MultiQC column changes or goes, and not when one comes.

<sample>.report.txt

[section], then a key and its value per line, on spaces; NA when missing. tinymapper.report.read_report reads it back, with pandas installed: its sections, by name, each its keys and their values. A section is there when the run has it: [input] and [calibration] for a ChIP-seq run with an input and a spike-in, [peaks] for ChIP-seq and ATAC-seq, [fragments] for ATAC-seq and MNase-seq, [strands] for RNA-seq, [hicstuff] for Hi-C.

Section Key Unit MultiQC column
report format_version the report's format: 1
report sample the sample's name the row
report outdir the run's output directory
report tinymapper_version the version that wrote the report
report written when it was written, local time (ISO 8601)
run version the version that ran
run started when the run started, local time (ISO 8601)
run duration_s s
run hash the run's hash
run mode ChIP, RNA, ATAC, MNase, HiC or shotgun
run sample, genome, input, calibration the path prefixes of the command line
run threads threads
run duplicates_kept true with --duplicates
run alignment, filter, blacklist the options of the command line
run gsize bp (ChIP-seq, ATAC-seq)
run extend_reads bp
run mnase_sizes bp, the smallest and the largest (MNase-seq)
run hicstuff, restriction, binning hicstuff's options, the enzymes, bp (Hi-C)
run as_single_end true or false (shotgun)
commands tinymapper the command line of the run
reads paired true for pairs
reads reads reads sequenced, both reads of a pair Reads
reads mapped reads mapped to the genome, primary alignments
reads mapped_pct % of reads Mapped
reads kept reads kept: filtered, without duplicates
reads kept_pct % of reads Kept
reads duplicates reads that are duplicates
reads duplicates_pct % of the mapped reads Duplicates
input as reads the input's reads (ChIP-seq)
calibration spikein the spike-in genome's name
calibration sample_genome_reads, sample_spikein_reads the sample's filtered reads on each genome
calibration sample_spikein_pct % of the sample's reads on both
calibration input_genome_reads, input_spikein_reads, input_spikein_pct the same, for the input
calibration ori the occupancy ratio: the sample's genome reads over its spike-in reads, divided by the same for the input
calibration scaling_factor the calibrated track's factor: ori per million of the sample's genome reads
peaks peaks peaks called by MACS3 Peaks
peaks reads_counted kept reads
peaks reads_in_peaks kept reads in a peak
peaks frip_pct % of reads_counted: the fraction of reads in peaks FRiP
peaks file the peaks, relative to the output directory
fragments pairs pairs kept (pairs only)
fragments median_bp, mean_bp, sd_bp bp: the kept fragments' sizes
fragments window_min_bp, window_max_bp bp, --MNaseSizes (MNase-seq)
fragments in_window_pct % of pairs in the window (MNase-seq)
strands forward, reverse kept reads on each strand, as the stranded tracks split them
strands forward_pct % of both
hicstuff version the hicstuff that wrote its report
hicstuff read_pairs, mapped_pairs, final_pairs pairs sequenced, with both reads mapped, kept
hicstuff trans_ratio the share of the kept pairs between two chromosomes, from 0 to 1
hicstuff report hicstuff's report, relative to the output directory
files log, bam, peaks, mcool, hicstuff_report the run's main outputs, relative to the output directory

Where the numbers come from:

  • reads, mapped: samtools flagstat of the alignments before filtering. RNA-seq's reads are STAR's input reads, a pair counting two, since STAR's BAM holds the mapped reads only.
  • kept: samtools stats of the filtered BAM, without the reads flagged as duplicates.
  • duplicates: samtools markdup; duplicates_pct is of the reads it examined, the mapped ones.
  • reads_counted and reads_in_peaks, forward and reverse: primary alignments of the filtered BAM, without duplicates (samtools view -c), as the tracks count them; for the strands, as deepTools' --filterRNAstrand splits a dUTP library.
  • A Hi-C run's [reads] comes from hicstuff's report, a pair counting two reads: kept is twice hicstuff's final pairs.

<sample>.report_mqc.yaml

MultiQC's custom content, id: tinymapper: the sample's row of the General Statistics table, with the columns of the table above. MultiQC finds it in a run's output directory, beside the statistics of samtools, STAR and MACS3, which its own modules read: each is named after the sample, so a sample has one row.

multiqc results/

A Hi-C run's row also has hicstuff's columns, from hicstuff's report, which is under the sample's name too. MultiQC's own hicstuff module reads hicstuff's log and distance law, which are named after <sample>^<hash>: to have them on the sample's row, tell MultiQC to clean the names after ^, in a multiqc_config.yaml:

extra_fn_clean_exts:
  - type: regex
    pattern: '\^.*'
multiqc --config multiqc_config.yaml results/

<sample>.report.html

A page to read the run with: the run's parameters and commands, where the reads went, then a section per part of the run (the input, the spike-in, the peaks, the fragments' sizes, the strands, Hi-C), and its files. Its plots are drawn by plotly.js, which it loads from its CDN: offline, it keeps its numbers and tables. A Hi-C run's page links to hicstuff's report.

hicstuff's report

A Hi-C run writes hicstuff's report of its pipeline under the sample's name, in matrices/<sample>/: <sample>.report.txt, <sample>.report_mqc.yaml and <sample>.report.html, with hicstuff's numbers on the reads, the pairs, the duplicates and the contacts (hicstuff's documentation). It needs hicstuff 4.1.0 or newer, whose hicstuff report --prefix writes it under another name than the pipeline's prefix, <sample>^<hash>.