Category
Genomic Interval Manipulation
Usage
closestBed [OPTIONS] -a -b
Manual
-s Require same strandedness. That is, find the closest feature in B that overlaps A on the _same_ strand. By default, overlaps are reported without respect to strand.
-S Require opposite strandedness. That is, find the closest featurein B that overlaps A on the _opposite_ strand. By default, overlaps are reported without respect to strand.
-d In addition to the closest feature in B, report its distance to A as an extra column. The reported distance for overlapping features will be 0.
-D
Like -d, report the closest feature in B, and its distance to A as an extra column. However unlike -d, use negative distances to report upstream features.
The options for defining which orientation is “upstream†are:
- ref Report distance with respect to the reference genome.
B features with a lower (start, stop) are upstream
- a Report distance with respect to A.
When A is on the - strand, “upstream†means B has a
higher (start,stop).
- b Report distance with respect to B.
When B is on the - strand, “upstream†means A has a
higher (start,stop).
-io Ignore features in B that overlap A. That is, we want close, yet not touching features only.
-iu Ignore features in B that are upstream of features in A. This option requires -D and follows its orientation rules for determining what is “upstreamâ€.
-id Ignore features in B that are downstream of features in A. This option requires -D and follows its orientation rules for determining what is “downstreamâ€.
-fu Choose first from features in B that are upstream of features in A.
This option requires -D and follows its orientation rules for determining what is “upstreamâ€.
-fd Choose first from features in B that are downstream of features in A.
This option requires -D and follows its orientation rules for determining what is “downstreamâ€.
-t
Specify how ties for closest feature should be handled. This occurs when two features in B have exactly the same “closeness†with A. By default, all such features in B are reported.
Here are all the options:
- all Report all ties (default).
- first Report the first tie that occurred in the B file.
- last Report the last tie that occurred in the B file.
-mdb
Specifiy how multiple databases should be resolved.
- each Report closest records for each database (default).
- all Report closest records among all databases.
-k Report the k closest hits. Default is 1. If tieMode = “allâ€, all ties will still be reported.
-names When using
multiple databases (
-b), provide an alias for each that will appear instead of a fileId when also printing the DB record.
-filenames When using
multiple databases (
-b), show each complete filename instead of a fileId when also printing the DB record.
-N Require that the query and the closest hit have different names. For BED, the 4th column is compared.
-header Print the header from the A file prior to results.
Share your experience or ask a question