Utility functions for manipulating chromosomal regions.
Utility functions for manipulating chromosomal regions.
(complement-regions base-region)
(complement-regions base-region in-regions)
Returns a sequence of regions complement to in-regions. in-regions must be sorted. Returns a stateful transducer when no regions provided.
Returns a sequence of regions complement to in-regions. in-regions must be sorted. Returns a stateful transducer when no regions provided.
(divide-refs refs step)
Divides refs into several chunks with maximum length 'step'. Returns a lazy sequence of map containing {:chr :start :end}.
Divides refs into several chunks with maximum length 'step'. Returns a lazy sequence of map containing {:chr :start :end}.
(divide-region start end step)
Divides a region [start end] into several chunks with maximum length 'step'. Returns a lazy sequence of vector.
Divides a region [start end] into several chunks with maximum length 'step'. Returns a lazy sequence of vector.
(format-region {:keys [chr start end]})
Format a region map into a string.
Format a region map into a string.
(format-region-strict region-map)
Format a region map into a string strictly.
Format a region map into a string strictly.
(merge-regions)
(merge-regions max-gap)
(merge-regions max-gap regions)
Same as 'merge-regions-with' except for 'merge-two-regions' is partially applied as merge-fn.
Same as 'merge-regions-with' except for 'merge-two-regions' is partially applied as merge-fn.
(merge-regions-with merge-fn)
(merge-regions-with merge-fn max-gap)
(merge-regions-with merge-fn max-gap regs)
Returns a lazy sequence of merged regions. Input regions must be sorted. Neighboring regions apart less than or equal to 'max-gap' will be merged with 'merge-fn'. Returns a stateful transducer when no input 'regions' is provided.
Returns a lazy sequence of merged regions. Input regions must be sorted. Neighboring regions apart less than or equal to 'max-gap' will be merged with 'merge-fn'. Returns a stateful transducer when no input 'regions' is provided.
(overlapped-regions? x y)
Returns true if two regions are overlapped with each other.
Returns true if two regions are overlapped with each other.
(parse-region region-str)
Parse a region string into a map.
Parse a region string into a map.
(parse-region-strict region-str)
Parse a region string into a map strictly.
Parse a region string into a map strictly.
(subtract-region lhs-reg rhs-reg)
Subtract a region from another one. Returns a vector of regions.
Subtract a region from another one. Returns a vector of regions.
(valid-region? {:keys [chr start end]})
Checks if the given region map is a valid 1-based closed range.
Checks if the given region map is a valid 1-based closed range.
(valid-rname? rname)
Checks if the given rname conforms to the spec of sam.
Checks if the given rname conforms to the spec of sam.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close