Category

Genomic Interval Manipulation


Usage

bedtools multicov [OPTIONS] -bams aln.1.bam aln.2.bam ... aln.n.bam -bed <bed/gff/vcf>


Manual

This tool is part of the bedtools suite.

Required Arguments

  • -bams: The bam files ($\ge1$ file(s)).
  • -bed bed/gff/vcf: The bed file.

Options

  • -split: Treat "split" BAM or BED12 entries as distinct BED intervals.
  • -s: Require same strandedness. That is, only report hits in B that overlap A on the same strand. (By default, overlaps are reported without respect to strand.)
  • -S: Require different strandedness. That is, only report hits in B that overlap A on the opposite strand. (By default, overlaps are reported without respect to strand.)
  • -f FLOAT: Minimum overlap required as a fraction of each A. (Default is $1\times10^{-9}$, i.e., 1bp.)
  • -r: Require that the fraction overlap be reciprocal for each A and B. In other words, if -f 0.90 and -r is used, this requires that B overlap 90% of A and A also overlaps 90% of B.
  • -q INT: Minimum mapping quality allowed. Default is 0.
  • -D: Include duplicate reads. Default counts non-duplicates only.
  • -F: Include failed-QC reads. Default counts pass-QC reads only.
  • -p: Only count proper pairs. Default counts all alignments with MAPQ > -q argument, regardless of the BAM FLAG field.

Examples

By default, multicov will report the count of alignments in each input BAM file that overlap.

$ cat ivls-of-interest.bed
chr1 0   10000   ivl1
chr1 10000   20000   ivl2
chr1 20000   30000   ivl3
chr1 30000   40000   ivl4

$ bedtools multicov -bams aln1.bam aln2.bam aln3.bam -bed ivls-of-interest.bed
chr1 0       10000   ivl1    100 2234    0
chr1 10000   20000   ivl2    123 3245    1000
chr1 20000   30000   ivl3    213 2332    2034
chr1 30000   40000   ivl4    335 7654    0

The output of multicov reflects a distinct report of the overlapping alignments for each record in the -bed file. In the example above, each line of the output reflects

  • the original line from the -bed file followed by
  • the count of alignments that overlap the -bed interval from each input -bam file.

In the example above, the output consists of 7 columns: the first four of which are the columns from the -bed file and the last 3 are the count of overlapping alignments from the 3 input -bam files. The order of the counts reflects the order of the files given on the command line.

File formats this tool works with
BEDBAMGFFGTFVCF

Share your experience or ask a question