complement-bed
Quick Start
- Command:
complementBed -i intervals.bed -g genome.txt [options] - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/complementBed - Full reference: See
references/help.md
When To Use This Tool
- Find genomic gaps not covered by an interval set.
- Derive intergenic or uncovered regions relative to a reference genome definition.
- Convert a mask or annotation track into its uncovered complement.
- Restrict complement output to chromosomes actually present in the input with
-L.
Common Patterns
# 1) Compute uncovered genome segments
complementBed \
-i exons.bed \
-g genome.txt
# 2) Limit complement to chromosomes represented in the input
complementBed \
-i targets.bed \
-g genome.txt \
-L
# 3) Use a FASTA index as the genome file
complementBed \
-i blacklist.bed \
-g reference.fa.fai
Recommended Workflow
- Build or obtain a correct genome file before trusting any complement output.
- Make sure the interval file and genome file use the same chromosome names.
- Decide whether the result should cover the whole genome from
-gor only chromosomes that appear in the input (-L). - Inspect edge chromosomes manually when the complement is unexpectedly huge, because that often indicates naming mismatches or missing contigs.
Guardrails
-gis mandatory.- The genome file must be tab-delimited with chromosome name in column 1 and chromosome length in column 2.
- Without
-L, chromosomes present in the genome file but absent from the input will be emitted in full as complement intervals. - Complement assumes the input intervals represent covered regions; overlapping or unsorted input can still produce valid complement output, but upstream normalization is often wise.
- Prefer
-hfor help; wrapper behavior for--versionis noisy.