bedtools/bedtools_multicov
Description
Count sequence coverage for multiple BAM files at specific genomic loci.
bedtools multicov counts the number of alignments from multiple BAM files that overlap
each interval in a BED/GFF/VCF file. For each genomic interval, it reports the coverage
from each BAM file in additional columns, making it ideal for comparing coverage across
multiple samples or conditions.
This tool is commonly used for:
Multi-sample coverage analysis across specific regions
Comparing read depths between different samples
Quality control of sequencing experiments
Preparing coverage data for differential analysis
Generating coverage matrices for downstream analysis
Inputs
Name | Type & Properties | Description |
|---|---|---|
--bams -bams | file required multiple | Input BAM files for coverage counting. **Format:** Sorted and indexed BAM files **Content:** Aligned sequencing reads **Usage:** Coverage will be calculated for each BAM file separately **Requirements:** Must be coordinate-sorted with corresponding .bai index files **Output:** Each BAM contributes one column to the output |
--bed -bed | file required | BED/GFF/VCF file with genomic intervals for coverage calculation. **Format:** BED, GFF, or VCF file with genomic coordinates **Content:** Intervals where coverage will be measured **Usage:** Each interval becomes a row in the output with coverage columns appended **Requirements:** Chromosome names must match BAM file references |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with coverage counts appended to input intervals. **Format:** Same as input BED/GFF/VCF with additional coverage columns **Content:** Original interval data plus one coverage column per BAM file **Columns:** Coverage counts are appended in the order BAM files were specified |
Overlap Options
Name | Type & Properties | Description |
|---|---|---|
--min_overlap -f | double | Minimum overlap required as a fraction of each BED interval. **Default:** 1E-9 (essentially 1 base pair) **Range:** 0.0 to 1.0 **Usage:** Read must overlap at least this fraction of the interval **Example:** 0.5 requires read to overlap at least 50% of interval |
--reciprocal -r | boolean_true | Require reciprocal overlap for both interval and read. **Usage:** Both interval and read must overlap each other by min_overlap fraction **Example:** With -f 0.9, interval must overlap 90% of read AND read must overlap 90% of interval **Effect:** More stringent overlap requirement than -f alone **Default:** false (only interval overlap required) |
Strand Options
Name | Type & Properties | Description |
|---|---|---|
--same_strand -s | boolean_true | Only count reads on the same strand as the interval. **Usage:** Requires strand information in BED file (6th column) **Effect:** Ignores reads on opposite strand **Applications:** Strand-specific RNA-seq analysis, antisense detection **Default:** false (count reads on both strands) |
--opposite_strand -S | boolean_true | Only count reads on the opposite strand from the interval. **Usage:** Requires strand information in BED file (6th column) **Effect:** Ignores reads on same strand **Applications:** Antisense RNA detection, strand-specific analysis **Default:** false (count reads on both strands) |
Read Filtering
Name | Type & Properties | Description |
|---|---|---|
--min_quality -q | integer | Minimum mapping quality (MAPQ) required for reads. **Default:** 0 (no quality filtering) **Range:** 0-255 **Usage:** Higher values exclude poorly mapped reads **Common values:** 10, 20, 30 for increasingly stringent filtering |
--include_duplicates -D | boolean_true | Include duplicate reads in coverage counting. **Default:** false (exclude duplicates) **Usage:** Count reads marked as duplicates in BAM FLAG field **Applications:** When duplicates represent real biological signal **Effect:** May increase coverage counts significantly |
--include_failed_qc -F | boolean_true | Include reads that failed quality control checks. **Default:** false (exclude failed QC reads) **Usage:** Count reads marked as QC failures in BAM FLAG field **Applications:** When QC failures should still be counted **Effect:** May include low-quality alignments |
--proper_pairs_only -p | boolean_true | Only count reads from proper pairs. **Default:** false (count all alignments above quality threshold) **Usage:** Requires both reads in pair to be properly aligned **Applications:** Paired-end sequencing quality control **Effect:** Excludes singleton reads and improperly paired reads |
Advanced Options
Name | Type & Properties | Description |
|---|---|---|
--split | boolean_true | Treat split BAM or BED12 entries as distinct intervals. **BAM context:** Count spliced alignments across individual exons **BED12 context:** Process each block in BED12 entry separately **Applications:** RNA-seq analysis, exon-specific coverage **Default:** false (treat as single interval) |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.bed"
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_multicov/main.nf \
-params-file params.yaml Relationships
Used by
No components use this component.
Current component
Uses
No component dependencies found.