module Make:functor (
Chromosome
:
Chromosome
) ->
sig
typerange =
Biocaml_range.t
typelocation =
Biocaml_genomeMap.Chromosome.t * range
A collection of non-overlapping regions (e.g. a set of CpG islands)
module Selection:
sig
type
t
val intersects :t -> Biocaml_genomeMap.Make.location -> bool
intersects loc sel
returnstrue
ifloc
has a non-empty intersection withsel
, andfalse
otherwise.
val overlap :t -> Biocaml_genomeMap.Make.location -> int
val to_stream :t ->
Biocaml_genomeMap.Make.location Stream.tval of_stream :Biocaml_genomeMap.Make.location Stream.t ->
tof_stream e
computes a selection (i.e. a set of non overlapping locations) as the union of the locations contained ine
end
module type Signal =sig
type
'a
tval eval :'a t ->
default:'a -> Biocaml_genomeMap.Chromosome.t -> int -> 'afunction evaluation at some point in the genome
val fold :'a t ->
init:'c -> f:('c -> Biocaml_genomeMap.Make.location -> 'b -> 'c) -> 'cfolds on constant intervals of the function, in increasing order
val to_stream :'a t ->
(Biocaml_genomeMap.Make.location * 'a) Stream.tstream over all constant intervals of the function, in increasing order
val of_stream :('a -> 'a -> 'a) ->
(Biocaml_genomeMap.Make.location * 'a) Stream.t ->
'a tof_stream f ls
builds a signal from a collection of annotated locations.f
is used when two locations intersect, to compute the annotation on their intersection. *Beware*,f
should be associative and commutative since when many locations inls
intersect, there is no guarantee on the order followed to aggregate them and their annotation.
end
Partial function over the genome (e.g.A set of locations (e.g. a set of gene loci)
module LSet:
sig
type
t
val to_stream :t -> Biocaml_genomeMap.Make.location Stream.t
val of_stream :Biocaml_genomeMap.Make.location Stream.t -> t
val intersects :t -> Biocaml_genomeMap.Make.location -> bool
intersects lset loc
returnstrue
ifloc
has a non-empty intersection with one of the locations inlset
, and returnsfalse
otherwise
val closest :t ->
Biocaml_genomeMap.Make.location ->
(Biocaml_genomeMap.Make.location * int) optionclosest lset loc
returns the location inlset
that is the closest toloc
, along with the actual (minimal) distance. ReturnsNone
if there is no location inlset
that comes from the same chromosome thanloc
.
val intersecting_elems :t ->
Biocaml_genomeMap.Make.location -> Biocaml_genomeMap.Make.location Stream.tintersecting_elems lset loc
returns a stream of all locations inlset
that intersectloc
.
end
A set of locations with an attached value on each of them
module LMap:
sig
type
'a
tval to_stream :'a t ->
(Biocaml_genomeMap.Make.location * 'a) Stream.tval of_stream :(Biocaml_genomeMap.Make.location * 'a) Stream.t ->
'a tval intersects :'a t -> Biocaml_genomeMap.Make.location -> bool
intersects lmap loc
returnstrue
ifloc
has a non-empty intersection with one of the locations inlmap
, and returnsfalse
otherwise
val closest :'a t ->
Biocaml_genomeMap.Make.location ->
(Biocaml_genomeMap.Make.location * 'a * int) optionclosest lmap loc
returns the location inlmap
that is the closest toloc
, along with its annotation and the actual (minimal) distance. ReturnsNone
if there is no location inlmap
that comes from the same chromosome thanloc
.
val intersecting_elems :'a t ->
Biocaml_genomeMap.Make.location ->
(Biocaml_genomeMap.Make.location * 'a) Stream.tintersecting_elems lmap loc
returns a stream of elements inlmap
whose location intersects withloc
.
end
end
Parameters: |
|