bedtools/bedtools_jaccard
genomics
intervals
jaccard
similarity
statistics
overlap
intersection
union
Description
Calculate Jaccard similarity statistic between two genomic feature files.
The Jaccard index measures similarity between finite sample sets, defined as
the size of the intersection divided by the size of the union. Values range
from 0 (no intersection) to 1 (identical sets). This tool calculates the
Jaccard statistic for genomic intervals, providing a quantitative measure
of overlap between two interval sets.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input_a -a | file required | First input file for Jaccard comparison. **Format:** BED, GFF, VCF file with genomic intervals **Requirement:** Must be sorted by chromosome, then start position **Usage:** File A for Jaccard similarity calculation |
--input_b -b | file required | Second input file for Jaccard comparison. **Format:** BED, GFF, VCF file with genomic intervals **Requirement:** Must be sorted by chromosome, then start position **Usage:** File B for Jaccard similarity calculation |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output file with Jaccard similarity statistics. **Format:** Tab-delimited with intersection, union, and Jaccard values **Columns:** intersection, union, jaccard **Range:** Jaccard values from 0.0 to 1.0 |
Overlap Options
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 (effectively 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 (effectively 1bp) **Example:** 0.50 requires 50% of B to be overlapped |
--reciprocal -r | boolean_true | Require reciprocal overlap for A overlapping B. **Requirement:** Must be used solely with -f (min_overlap_a) **Effect:** Requires B overlaps specified fraction of A AND A overlaps same fraction of B **Example:** With -f 0.90 -r, requires B overlaps 90% of A AND A overlaps 90% of B **Default:** false |
--either -e | boolean_true | Require minimum fraction satisfied for A OR B. **Effect:** Only one of -f or -F thresholds needs to be satisfied **Alternative:** Without -e, both fractions must be satisfied **Default:** false (both required) |
Strand Options
Name | Type & Properties | Description |
|---|---|---|
--same_strand -s | boolean_true | Require same strandedness for overlaps. **Effect:** Only consider overlaps on the same strand **Default:** false (strand-independent) |
--opposite_strand -S | boolean_true | Require different strandedness for overlaps. **Effect:** Only consider overlaps on opposite strands **Default:** false (strand-independent) **Note:** May have issues in some bedtools versions requiring strand specification |
Format Options
Name | Type & Properties | Description |
|---|---|---|
--split | boolean_true | Treat split BAM or BED12 entries as distinct intervals. **Effect:** Split multi-block entries into individual intervals **Usage:** For BAM alignments with gaps or BED12 entries **Default:** false |
--bed_output --bed | boolean_true | Write output in BED format when using BAM input. **Effect:** Forces BED output format for BAM inputs **Default:** false |
--header | boolean_true | Print header from file A prior to results. **Effect:** Includes original header from input file A **Default:** false |
Advanced Options
Name | Type & Properties | Description |
|---|---|---|
--genome -g | file | Genome file for consistent chromosome sorting. **Format:** Tab-delimited file with chromosome name and size **Usage:** Only applies when used with sorted data **Purpose:** Enforces consistent chromosome sort order |
--no_name_check --nonamecheck | boolean_true | Skip chromosome naming convention checks for sorted data. **Effect:** Allows different naming (e.g., "chr1" vs "chr01") **Usage:** For files with inconsistent chromosome naming **Default:** false (strict checking) |
--no_buffer --nobuf | boolean_true | Disable buffered output. **Effect:** Print each line immediately instead of buffering **Usage:** For real-time processing or piping **Trade-off:** Slower performance but immediate output **Default:** false (buffered output) |
--io_buffer --iobuf | string | Specify input buffer memory size. **Format:** Integer with optional K/M/G suffix **Example:** "128M" for 128 megabytes **Note:** No effect with compressed files |
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.2 \
-main-script target/nextflow/bedtools/bedtools_jaccard/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
bedtools/bedtools_jaccardbiobox v0.4.2
Uses
0 relationships
No component dependencies found.