Skip to content

Command line

Every command of tinymapper, and every option. tests/test_docs.py checks this page against the command line: a command or an option that is missing here, or that the command line does not have, fails the tests.

Each command has a section headed with its name, ### `tinymapper` { #tinymapper }, with a table whose first column lists its options, short form first: | `-o, --output` | … |. Both commands also take these two:

Option Description
-h, --help Show the command's help, and exit.
-v, --version Show the version, and exit. tinymapper's -v is --version, as tinyMapper.sh's was, not --verbose.

Option names keep tinyMapper.sh's spelling (--keepIntermediate, --MNaseSizes, -bl, -hic), and tinyMapper.sh takes the same options as tinymapper (Installation).

Commands

tinymapper

Map the reads of one sample and process them into tracks, peaks or contact maps, by mode. A run writes its outputs, its log and its report in its output directory (File formats); each mode has its guide.

tinymapper -m ChIP -s ~/reads/JS001 -g ~/genomes/R64-1-1/R64-1-1 -o ~/results

Required

Option Default Description
-m, --mode The mode: ChIP, RNA, ATAC, MNase, HiC or shotgun, in any case. Each has its guide: ChIP-seq, RNA-seq, ATAC-seq, MNase-seq, Hi-C, shotgun.
-s, --sample The sample's reads, as a path prefix: ~/reads/JS001 for ~/reads/JS001_R1.fq.gz and ~/reads/JS001_R2.fq.gz (how the files are found). Its base name, JS001, is the sample's name.
-g, --genome The genome, as a path prefix: ~/genomes/W303/W303 for ~/genomes/W303/W303.fa, with its indexes beside it (Installation).

Core

Option Default Description
-o, --output results The output directory, made if missing. Several runs, of several samples, can share it: each file carries its run's hash.
-t, --threads 8 The threads of the programs.

Alignment and filtering

Option Default Description
-a, --alignment More options for bwa-mem2 mem, in quotes (ChIP-seq, ATAC-seq, MNase-seq, shotgun).
-f, --filter -f 0x001 -f 0x002 -F 0x004 -F 0x008 -q 10 The paired-end reads kept, as samtools view options, in quotes: by default, pairs whose two reads map, as a proper pair, with a mapping quality of 10 or more. Single-end reads are kept with -F 0x004 -q 10; RNA-seq keeps STAR's alignments, and Hi-C hicstuff's pairs (Concepts).
-bl, --blacklist A BED file of regions left out of the tracks (bamCoverage --blackListFileName).
-gs, --gsize 13000000 The effective genome size, for MACS3's peaks (ChIP-seq, ATAC-seq): the yeast genome's by default.
-d, --duplicates off Keep the duplicates. By default, samtools markdup removes them from paired-end BAMs and flags them in single-end and RNA-seq BAMs, and the tracks leave them out. Hi-C runs follow hicstuff's own --duplicates.
-e, --extend-reads The fragment length to which the tracks extend single-end reads (bamCoverage --extendReads), in bp. Required for single-end reads, but for RNA-seq; paired-end reads are extended to their mate.

Hi-C

Option Default Description
-hic, --hicstuff --mapping 5spm --duplicates --filter --plot --no-cleanup The options of hicstuff pipeline, in quotes. The default maps with bwa mem -5SPM, which needs hicstuff 4.1.0 or newer; --mapping iterative maps with bowtie2, as tinymapper did before 0.15.0 (Hi-C).
-re, --restriction HpaII,HinfI The restriction enzymes, comma-separated, as hicstuff pipeline --enzyme takes them.
-b, --binning 500 The bin size of the contact map, in bp: the .mcool's finest resolution.
-ba, --balance none: cooler balance's defaults Arguments of cooler balance, which balances each resolution of the .mcool, given to hicstuff as --balancing-args: --balance '--cis-only --min-nnz 3'. --balancing-args in --hicstuff wins over it.

ChIP-seq

Option Default Description
-i, --input The input (control) sample's reads, as a path prefix, as for --sample.
-c, --calibration The spike-in genome, as a path prefix, as for --genome: the sample's and the input's reads are mapped to both genomes, and a calibrated track is made. Needs --input, and paired-end reads.

MNase-seq

Option Default Description
-M, --MNaseSizes 130,200 The smallest and the largest fragment kept for the nucleosome tracks, in bp (paired-end reads).

Shotgun

Option Default Description
--as-single-end off Map R1 and R2 each as single-end reads, as the shotgun mode did before 0.14.24. Needs --extend-reads.

Output

Option Default Description
-k, --keepIntermediate off Keep the intermediate files: the alignments before filtering (SAM), the reads a calibrated run left unmapped, and hicstuff's temporary files.
--dry-run off Log the commands without running them: the run writes its log and its .err file, and nothing else.

A run exits with 0 when it went to its end, and with 1 when it failed: its log says why (Logs).

tinymapper-report

Write the report of runs again, from their output directory: their numbers, their MultiQC row and their page (The report of a run). A run writes its report at its end; this command writes it again, for instance after a run that could not, or into another directory.

tinymapper-report ~/results                       # the newest run of each sample
tinymapper-report ~/results -s JS001 --force      # the newest run of JS001, over its report

It reads what the runs left, and runs no program: their logs, the statistics in stats/, the peaks and hicstuff's report. A run that failed, or a dry run, has no report.

Argument or option Default Description
RUN_DIR The output directory of the runs (tinymapper --output).
-s, --sample every sample The sample whose newest run is reported: its name, or the path prefix given to tinymapper --sample.
-l, --log the newest of each sample The run's log, logs/<sample>.tinymapper_<YYYYMMDDHHMMSS>.log. An older run than the newest of its sample is refused: stats/<sample>/ holds the newest run's statistics.
-o, --outdir RUN_DIR The directory of the reports, made if missing.
-F, --force off Overwrite a report that is there: without it, the command refuses.