Module Biocaml.Wig

module Wig: Biocaml_wig

type pt = string * int * int * float 
A data point is a 4-tuple (chr,lo,hi,x), where x is the value assigned to interval [lo, hi], inclusive of end-points, on chromosome chr.
type t 
Type of WIG data. Can be thought of as a collection of pt's. Coordinates of data points are not allowed to overlap, for each chromosome.

type format =
| Bed
| VariableStep
| FixedStep (*The three formats in which WIG data can be specified.*)
exception Bad of string
val of_list : pt list -> t
Construct WIG data from given pt's. Raise Bad if any pt's are invalid.
val to_list : t -> pt list
Extract data as a flat list.
val iter : (pt -> unit) -> t -> unit
val fold : ('a -> pt -> 'a) -> 'a -> t -> 'a
val to_file : ?fmt:format -> t -> string -> unit
to_file ~fmt t file prints t to file. Printing is in most efficient format possible by default. Optional fmt argument forces printing in a specific format. Requesting VariableStep or FixedStep may raise Failure if given data cannot be represented in those formats.
val to_channel : ?fmt:format -> t -> Pervasives.out_channel -> unit
Like to_file but print to channel.
val of_channel : ?fmt:format ->
?chr_map:(string -> string) ->
?header:bool ->
?increment_lo_hi:int * int -> Pervasives.in_channel -> t
val of_file : ?fmt:format ->
?chr_map:(string -> string) ->
?header:bool -> ?increment_lo_hi:int * int -> string -> t