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
Contributors
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 Name | Type & Properties |
|---|---|
--input_a -a | file required |
--input_b -b | file required multiple |
Name | Type & Properties |
|---|---|
--output | file required output |
Name | Type & Properties |
|---|---|
--distance -d | boolean_true |
--distance_mode -D | string |
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 |
Name | Type & Properties |
|---|---|
--k_closest -k | integer |
--tie_mode -t | string |
--different_names -N | boolean_true |