Indicator function on a genome
module Biocaml_genomeMap:
sig
typerange =
Biocaml_range.t
type'a
location ='a * range
Indicator function on a genome
module Selection:
sig
type 'a
t
val intersects : 'a Biocaml_genomeMap.location -> 'a t -> bool
intersects loc sel
returns true
if loc
has a non-empty
intersection with sel
, and false
otherwise.val intersection_size : 'a Biocaml_genomeMap.location -> 'a t -> int
val to_stream : 'a t -> 'a Biocaml_genomeMap.location Stream.t
val of_stream : 'a Biocaml_genomeMap.location Stream.t -> 'a t
of_stream e
computes a selection as the union of the locations contained in e
end
module type Signal =
sig
type ('a, 'b)
t
val make : ('b list -> 'c) ->
('a Biocaml_genomeMap.location * 'c) Stream.t ->
('a, 'c) t
val eval : 'a -> int -> ('a, 'b) t -> 'b
val fold : ('a -> Biocaml_genomeMap.range -> 'b -> 'c -> 'c) ->
('a, 'b) t -> 'c -> 'c
val to_stream : ('a, 'b) t ->
('a Biocaml_genomeMap.location * 'b) Stream.t
end
A set of locations
module LSet:
sig
type 'a
t
val to_stream : 'a t -> 'a Biocaml_genomeMap.location Stream.t
val of_stream : 'a Biocaml_genomeMap.location Stream.t -> 'a t
val intersects : 'a Biocaml_genomeMap.location -> 'a t -> bool
intersects loc lmap
returns true
if loc
has a non-empty
intersection with one of the locations in lmap
, and returns
false
otherwiseval closest : 'a Biocaml_genomeMap.location ->
'a t -> ('a Biocaml_genomeMap.location * int) option
closest loc lset
returns the location in lset
that is the
closest to loc
, along with the actual (minimal)
distance. Returns None
if there is no location in lset
that comes from the same sequence than loc
.val intersecting_elems : 'a Biocaml_genomeMap.location ->
'a t -> 'a Biocaml_genomeMap.location Stream.t
intersecting_elems loc lset
returns an enumeration of all
locations in lset
that intersect loc
.end
A set of locations with an attached value on each of them
module LMap:
sig
type ('a, 'b)
t
val to_stream : ('a, 'b) t ->
('a Biocaml_genomeMap.location * 'b) Stream.t
val of_stream : ('a Biocaml_genomeMap.location * 'b) Stream.t ->
('a, 'b) t
val intersects : 'a Biocaml_genomeMap.location -> ('a, 'b) t -> bool
intersects loc lmap
returns true
if loc
has a non-empty
intersection with one of the locations in lmap
, and returns
false
otherwiseval closest : 'a Biocaml_genomeMap.location ->
('a, 'b) t ->
('a Biocaml_genomeMap.location * 'b * int) option
closest loc lmap
returns the location in lmap
that is the
closest to loc
, along with its annotation and the actual (minimal)
distance. Returns None
if there is no location in lmap
that comes from the same sequence than loc
.val intersecting_elems : 'a Biocaml_genomeMap.location ->
('a, 'b) t ->
('a Biocaml_genomeMap.location * 'b) Stream.t
intersecting_elems loc lmap
returns an enumeration of elements
in lmap
whose location intersects with loc
.end
module type LMap_spec =
sig
type ('a, 'b)
t
val make : ('a Biocaml_genomeMap.location * 'b) Stream.t ->
('a, 'b) t
val fold : ('a -> Biocaml_genomeMap.range -> 'b -> 'c -> 'c) ->
('a, 'b) t -> 'c -> 'c
val pwfold : ('a -> Biocaml_genomeMap.range -> 'b list -> 'c -> 'c) ->
('a, 'b) t -> 'c -> 'c
lm
is a range intersecting lm
and
that do not contain any start or end of a range from lm
. A maximal
constant interval is a constant interval, maximum for inclusion.
pwfold f lm init
folds on maximal constant intervals of lm
,
in increasing orderval intersects : 'a Biocaml_genomeMap.location ->
('a, 'b) t -> bool
val to_stream : ('a, 'b) t ->
('a Biocaml_genomeMap.location * 'b) Stream.t
val union : ('a, 'b) t ->
('a, 'b) t ->
('a, 'b) t
val add : 'a Biocaml_genomeMap.location ->
'b ->
('a, 'b) t ->
('a, 'b) t
end
end