Interval: compute coverage
Operation
“Coverage” in the IWC corpus is two operations sharing the bedtools family and the word. Decide which question you are asking before picking the tool.
- Genome-wide depth → bedgraph.
toolshed.g2.bx.psu.edu/repos/iuc/bedtools/bedtools_genomecoveragebed(“bedtools Genome Coverage”) emits per-position or per-interval depth across the whole genome. Used as a normalized coverage track (transcriptomics) or as the input to a low-coverage mask (SARS-CoV-2 consensus). - Reads in given regions → counts.
toolshed.g2.bx.psu.edu/repos/iuc/bedtools/bedtools_coveragebed(“bedtools Coverage”) counts/measures how much of a second dataset (reads, features) falls inside each region of a supplied interval set.
Parameter names are corpus-inferred from tool_state.
When to reach for it
- Track or mask input (
genomecoveragebed): you have alignments (BAM) and want depth everywhere — to visualize, or to threshold into low/high-coverage regions. Feeds interval-mask-by-set-algebra. - Reads-in-regions (
coveragebed): you already have the regions of interest (peaks, windows, a panel) and want a number per region. This is the quantify step of interval-windowed-coverage.
If you only need a yes/no overlap, not a count, use interval-overlap-filter.
Mode A — genome-wide depth (genomecoveragebed)
input_type.input_type_select:bam(corpus) orbed.report.report_select:bg(bedgraph) in every corpus case.report.zero_regions:trueemits zero-depth spans as explicit rows — required when a downstream filter must see the gaps (the mask use,consensus-from-variation).falseomits them (the track use,rnaseq-pe).report.scale: a multiplier; a connectedConnectedValuecarrying 1/million-reads gives a normalized track (rnaseq-pe)."1.0"for raw depth.
split:truesplits spliced/blocked alignments into their blocks before counting (corpus:truefor the mask case).strand:""(both strands) in the corpus.d,dz,five,three: per-position / 5’/3’ report flags (bedtools-d/-dz/-5/-3); allfalsein the corpus (bedgraph mode is used instead).
tool_id: toolshed.g2.bx.psu.edu/repos/iuc/bedtools/bedtools_genomecoveragebed/2.31.1
tool_state:
input_type: { input_type_select: bam, input: { __class__: ConnectedValue } }
report: { report_select: bg, zero_regions: true, scale: "1.0" }
split: true
strand: ""
d: false
dz: false
five: false
three: false
Mode B — reads in given regions (coveragebed)
inputA: the regions to quantify over (connected).reduce_or_iterate:iteratein the corpus —inputB(the reads/features dataset) applied per collection element.hist:truereports a coverage histogram per region;false(corpus) reports per-region summary columns.mean:truereports mean depth instead of counts;falsein the corpus.d,a_or_b,overlap_a,overlap_b,reciprocal_overlap,sorted,split,strandedness: report/overlap toggles; corpus defaults (false/null).
tool_id: toolshed.g2.bx.psu.edu/repos/iuc/bedtools/bedtools_coveragebed/2.31.1+galaxy0
tool_state:
inputA: { __class__: ConnectedValue }
reduce_or_iterate:
reduce_or_iterate_selector: iterate
inputB: { __class__: ConnectedValue }
hist: false
mean: false
d: false
sorted: false
split: false
strandedness: false
Pitfalls
- Picking the wrong mode.
genomecoveragebedanswers “how deep is every position?”;coveragebedanswers “how much falls in these regions?” They are not interchangeable —coveragebedneeds you to supply the regions;genomecoveragebedinvents them from the genome. zero_regionsis correctness, not cosmetics, for masking. Omit it and zero-depth spans never appear as rows, so ac4 < thresholdfilter cannot select them — the mask silently misses fully-uncovered regions. See interval-mask-by-set-algebra.splitmatters for spliced reads. RNA-seq/coverage over spliced alignments withoutsplit: truecounts the intron span as covered. The corpus setssplit: truewherever spliced input is plausible.- bedgraph is interval data, but downstream often treats it as tabular. A
Filter1 c4 < Non the bedgraph is a tabular filter on coordinate data — the interval↔tabular seam; see galaxy-tabular-patterns.
See also
- galaxy-interval-patterns — the interval pattern map.
- interval-windowed-coverage — slop → merge → coverage recipe (Mode B is its last step).
- interval-mask-by-set-algebra — Mode A feeds the masking recipe.
- iwc-interval-operations-survey — corpus evidence.