samtools-bedcov(1)
okay bestie, welcome to samtools-bedcov(1) from the Bioinformatics tools crew ๐ this is the one that does coverage over regions in a BED file, and yes we're gonna get into every flag.
๐ธ NAME ๐ธ
samtools bedcov โ reports coverage over regions in a supplied BED file. periodt.
โจ SYNOPSIS โจ
samtools bedcov [options] region.bed in1.sam|in1.bam|in1.cram[...]
๐ฆ DESCRIPTION ๐ฆ
So basically: it reports the total read base count โ i.e. the sum of per base read depths โ for each genomic region specified in the supplied BED file. The regions are output as they appear in the BED file and are 0-based โจ
Columns 1-3 are chrom/start/end as per the input BED file, followed by N columns of coverages (for N input BAMs), then (if given -d), N columns of bases-at-depth-X, then (if given -c) N columns of read counts. literally the whole little column pipeline, iykyk.
๐ OPTIONS ๐
-Q,--min-MQ INTโ only count reads with mapping quality greater than or equal toINT๐ฅ no weak-map reads allowed.-g FLAGSโ by default, reads that have any of the flagsUNMAP,SECONDARY,QCFAIL, orDUPset are skipped. To include these reads back in the analysis, use this option together with the desired flag or flag combination.FLAGScan be specified in hex by beginning with0x(i.e./^0x[0-9A-F]+/), in octal by beginning with0(i.e./^0[0-7]+/), as a decimal number not beginning with'0'or as a comma-separated list of flag names.[0]
For a list of flag names see samtools-flags(1).
-G FLAGSโ discard any read that has any of the flags specified byFLAGSset.FLAGSare specified as for the-goption.[UNMAP,SECONDARY,QCFAIL,DUP]๐-jโ do not include deletions (D) and ref skips (N) inbedcovcomputation. okay so those little guys are out of the count.-d INTโ print an additional column, for each file, containing the number of bases having a depth above and including the given threshold. If the option is not used, the extra column is not displayed. The option value must be an integer>= 0. math girlies rise ๐ง--max-depth INTโ specifies the maximum depth used for thempileupalgorithm. If-dis used and is larger then this value will be used instead. Defaults to2 billion, but smaller values may be used when we do not require an exact count in excessively deep regions and are interested in maximizing speed of results. speed vs exactness, the eternal vibe check.-cโ print an additional column with the read count for this region. This will be+1for every read covering the region, not just starting within in. The whole read filtering options-Q,-gand-Goptions will also have an effect on this count, but-dwill not. ๐-Xโ if this option is set, it will allows user to specify customized index file location(s) if the data folder does not contain any index file. Example usage:
samtools bedcov [options] -X <in.bed> </data_folder/in1.bam> [...] </index_folder/index1.bai> [...]
-Hโ okay bestie, the source line here is literallyยฎcopied to the output.and I am not fixing that mysteriousยฎ, I'm just keeping it fr fr. When it is not available, a header is created with field names matching the fields listed in the GA4GH BED specification. The-cand-doptions can add further per-file columns namedin1.sam_countandin1.sam_depthalong within1.sam_count. ๐
yes, thatยฎis really in the source text, and that duplicatein1.sam_countis staying too. no cap.
๐ AUTHOR ๐
Written by Heng Li from the Sanger Institute. ๐
๐ SEE ALSO ๐
Samtools website: <http://www.htslib.org/>
later bestie ๐ซถ this little manual page is from samtools-1.24, dated 9 July 2026 โ slay, bye ๐
๐ฆ where this page comes from
- epel 10: samtools 1.24-2.el10_3 ยท MIT
- nixpkgs unstable: samtools 1.24
- Copyright (C) 2008-2011, 2013-2018, 2020, 2022, 2024 Genome Research Ltd
- copyright (C) 2010, 2011 Broad Institute
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms