Skip to content

ChIP-seq

tinymapper -m ChIP maps a ChIP-seq sample, with or without its input (control), and with or without a spike-in genome to calibrate it, then makes its tracks and calls its peaks.

A run

# The sample alone
tinymapper -m ChIP -s ~/reads/JS001_IP -g ~/genomes/R64-1-1/R64-1-1 -o ~/results

# With its input
tinymapper -m ChIP \
    --sample ~/reads/JS001_IP \
    --input  ~/reads/JS001_input \
    --genome ~/genomes/R64-1-1/R64-1-1 \
    --output ~/results

# With its input and a spike-in genome
tinymapper -m ChIP \
    --sample      ~/reads/JS001_IP \
    --input       ~/reads/JS001_input \
    --genome      ~/genomes/R64-1-1/R64-1-1 \
    --calibration ~/genomes/CBS138/CBS138 \
    --output      ~/results

What it does

  1. Mapping: bwa-mem2 maps the sample's reads, and the input's, to the genome (--alignment adds options).
  2. Filtering: samtools marks the duplicates and removes them from paired-end reads, then keeps the reads --filter keeps (Concepts).
  3. Tracks: deepTools' bamCoverage makes a track of the sample, and one of the input, in counts per million mapped reads (CPM); with an input, bamCompare makes the sample's ratio to it, and its log2 ratio.
  4. Peaks: MACS3 calls the sample's peaks, against the input if there is one, from pairs (--format BAMPE) or single reads (--format BAM), with the effective genome size --gsize.

With a spike-in genome

With --calibration, the sample's and the input's reads are also mapped to the spike-in genome: the reads that map to it are counted, and those that do not are the ones mapped to the genome and filtered. The occupancy ratio (ORI) compares the sample's reads on the genome and on the spike-in to the input's, and a calibrated track scales the sample's coverage by it. Calibration needs an input, and paired-end reads.

What it writes

In --output, for a sample JS001_IP and an input JS001_input (File names):

  • bam/genome/JS001_IP/ and bam/genome/JS001_input/: the filtered BAM files;
  • tracks/JS001_IP/: ….CPM.bw, ….vs-JS001_input.bw, ….vs-JS001_input.log2.bw, and with a spike-in ….CPM.calibrated.bw; tracks/JS001_input/: the input's ….CPM.bw;
  • peaks/JS001_IP/: MACS3's _peaks.narrowPeak, _peaks.xls and _summits.bed;
  • stats/JS001_IP/, stats/JS001_input/: the statistics, and with a spike-in the counts on each genome;
  • JS001_IP.report.txt, .report_mqc.yaml, .report.html: the report, with the sections [reads], [input], [calibration] and [peaks] (The report of a run).

Single-end reads

Without an R2, the run maps single-end reads; --extend-reads gives the fragment length to which the tracks extend them:

tinymapper -m ChIP -s ~/reads/JS001_IP -i ~/reads/JS001_input \
    -g ~/genomes/R64-1-1/R64-1-1 --extend-reads 200

Their duplicates are flagged, not removed, and left out of the tracks. A spike-in calibration needs paired-end reads.