bedtools/bedtools_closest

Closest
Nearest
Distance
BED
GFF
VCF
Association

Description

Find the closest feature in file B for each feature in file A.

For each interval in file A, this tool identifies the nearest feature in
file B, regardless of whether they overlap. Useful for associating genomic
features with their nearest neighbors, such as finding the closest gene
to each SNP or the nearest regulatory element to each promoter.

Default behavior: Reports closest feature regardless of strand or overlap
Distance reporting: Optional distance calculation with various orientations
Multiple hits: Configurable handling of ties and k-nearest neighbors

Type

bash_script

License

MIT

Keywords

Closest
Nearest
Distance
BED
GFF
VCF
Association

Contributors

Run this component

Run the following command to execute this component with Nextflow:

cat > params.yaml <<'EOM'  
output: "$id.$key.output.bed"  
k_closest: [ 1 ]  
tie_mode: [ "all" ]  
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_closest/main.nf \  
  -params-file params.yaml  

Inputs

Name
Type & Properties
--input_a
-a
file
required
--input_b
-b
file
required
multiple

Outputs

Name
Type & Properties
--output
file
required
output

Distance Options

Name
Type & Properties
--distance
-d
boolean_true
--distance_mode
-D
string

Filtering Options

Name
Type & Properties
--ignore_overlaps
-io
boolean_true
--ignore_upstream
-iu
boolean_true
--ignore_downstream
-id
boolean_true
--force_upstream
-fu
boolean_true
--force_downstream
-fd
boolean_true
--strand
-s
boolean_true
--different_strand
-S
boolean_true

Advanced Options

Name
Type & Properties
--k_closest
-k
integer
--tie_mode
-t
string
--different_names
-N
boolean_true

Collaborate Accelerate Succeed

Empower your organization with secure, scalable workflow solutions that simplify development, ensure compliance, and drive innovation.

Viash Hub is a platform developed by Data Intuitive, a Belgian-based bioinformatics company specializing in data workflow development and deployment.