package biocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Partial function over the genome (e.g. conservation signal)

This module implements a partial function over the genome: each base may be associated to a value. Alternatively, this can be seen as a collection of non-overlapping regions each labeled with a value

type 'a t
val eval : 'a t -> default:'a -> Chromosome.t -> int -> 'a

function evaluation at some point in the genome

val fold : 'a t -> init:'c -> f:('c -> location -> 'b -> 'c) -> 'c

folds on constant intervals of the function, in increasing order

val to_stream : 'a t -> (location * 'a) Stream.t

stream over all constant intervals of the function, in increasing order

val of_stream : ('a -> 'a -> 'a) -> (location * 'a) Stream.t -> 'a t

of_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 in ls intersect, there is no guarantee on the order followed to aggregate them and their annotation.