bedtools/bedtools_coverage
genomics
intervals
coverage
depth
breadth
overlap
statistics
Description
Calculate coverage of genomic intervals from one file over intervals in another.
This tool reports the depth and breadth of coverage of features from file B
over the intervals in file A. It provides detailed coverage statistics including
overlap counts, covered bases, and coverage fractions.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input_a -a | file required | Query intervals file in BED, GFF, or VCF format. **Purpose:** Intervals for which coverage will be calculated **BED format:** Standard genomic interval format **GFF format:** Gene feature format with annotations **VCF format:** Variant call format |
--input_b -b | file required multiple | Coverage source file(s) in BED, GFF, VCF, or BAM format. **Purpose:** Features that provide coverage over query intervals **Multiple files:** Can specify multiple coverage sources **BAM support:** Binary alignment files for sequencing coverage |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with coverage statistics. **Default output:** For each interval in A, reports: 1. Number of overlapping features from B 2. Number of bases in A with non-zero coverage 3. Length of interval in A 4. Fraction of bases in A with non-zero coverage |
Coverage Reporting
Name | Type & Properties | Description |
|---|---|---|
--histogram -hist | boolean_true | Report coverage histogram for each feature and summary. **Output format:** depth, bases at depth, feature size, percentage **Use case:** Detailed coverage distribution analysis |
--depth_per_position -d | boolean_true | Report depth at each position in each interval. **Output:** One-based positions with coverage depth **Use case:** Position-specific coverage analysis **Note:** Generates large output for long intervals |
--counts_only -counts | boolean_true | Only report overlap counts, no fractions. **Simplified output:** Just the number of overlapping features **Use case:** When only overlap counts are needed |
--mean_depth -mean | boolean_true | Report mean coverage depth for each interval. **Output:** Average depth across all positions in interval **Use case:** Summary coverage statistics |
Strand Options
Name | Type & Properties | Description |
|---|---|---|
--same_strand -s | boolean_true | Require same strandedness for overlaps. **Default:** Overlaps reported regardless of strand **When enabled:** Only count overlaps on same strand |
--different_strand -S | boolean_true | Require different strandedness for overlaps. **Default:** Overlaps reported regardless of strand **When enabled:** Only count overlaps on opposite strand |
Overlap Requirements
Name | Type & Properties | Description |
|---|---|---|
--min_overlap_a -f | double | Minimum overlap required as fraction of A. **Range:** 0.0 to 1.0 **Default:** 1E-9 (essentially 1bp) **Example:** 0.50 requires 50% of A to be overlapped |
--min_overlap_b -F | double | Minimum overlap required as fraction of B. **Range:** 0.0 to 1.0 **Default:** 1E-9 (essentially 1bp) **Example:** 0.80 requires 80% of B to overlap A |
--reciprocal -r | boolean_true | Require reciprocal minimum fraction for A AND B. **Requires:** Both -f and -F fractions to be satisfied **Use case:** Stringent overlap requirements |
--either -e | boolean_true | Require minimum fraction for A OR B (not both). **Default:** Both -f and -F must be satisfied **When enabled:** Either fraction requirement is sufficient |
Format Options
Name | Type & Properties | Description |
|---|---|---|
--split | boolean_true | Treat split BAM/BED12 entries as distinct intervals. **BAM:** Handle spliced alignments as separate blocks **BED12:** Process each block independently |
--bed_output -bed | boolean_true | Write output in BED format when using BAM input. **Default:** BAM input produces BAM-style output **When enabled:** Force BED format output |
--header | boolean_true | Print header from input A file before results. **Use case:** Preserve metadata from input file |
Performance Options
Name | Type & Properties | Description |
|---|---|---|
--sorted | boolean_true | Use chromsweep algorithm for sorted input. **Requirements:** Input must be sorted by chromosome and position **Performance:** Faster processing for large files |
--genome -g | file | Genome file for consistent chromosome ordering. **Format:** Tab-delimited chromosome names and sizes **Use case:** Ensure consistent sort order with -sorted option |
--no_name_check -nonamecheck | boolean_true | Don't error on different chromosome naming conventions. **Example:** Allows mixing "chr1" and "chr01" **Use case:** Working with files from different sources |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.txt"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.4.1 \
-main-script target/nextflow/bedtools/bedtools_coverage/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_coveragebiobox v0.4.1
Uses
0 relationships
No component dependencies found.