sig
type comment = [ `comment of string ]
type variable_step =
[ `variable_step_state_change of string * int option
| `variable_step_value of int * float ]
type fixed_step =
[ `fixed_step_state_change of string * int * int * int option
| `fixed_step_value of float ]
type bed_graph_value = string * int * int * float
type item =
[ `bed_graph_value of Biocaml_wig.bed_graph_value
| `comment of string
| `fixed_step_state_change of string * int * int * int option
| `fixed_step_value of float
| `variable_step_state_change of string * int option
| `variable_step_value of int * float ]
module Error :
sig
type parsing =
[ `cannot_parse_key_values of Biocaml_internal_utils.Pos.t * string
| `empty_line of Biocaml_internal_utils.Pos.t
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `missing_chrom_value of Biocaml_internal_utils.Pos.t * string
| `missing_start_value of Biocaml_internal_utils.Pos.t * string
| `missing_step_value of Biocaml_internal_utils.Pos.t * string
| `unrecognizable_line of
Biocaml_internal_utils.Pos.t * string list
| `wrong_bed_graph_value of Biocaml_internal_utils.Pos.t * string
| `wrong_fixed_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_span_value of Biocaml_internal_utils.Pos.t * string
| `wrong_start_value of Biocaml_internal_utils.Pos.t * string
| `wrong_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_variable_step_value of
Biocaml_internal_utils.Pos.t * string ]
val parsing_error_to_string : Biocaml_wig.Error.parsing -> string
type to_bed_graph =
[ `not_in_fixed_step_state | `not_in_variable_step_state ]
type t =
[ `cannot_parse_key_values of Biocaml_internal_utils.Pos.t * string
| `empty_line of Biocaml_internal_utils.Pos.t
| `incomplete_input of
Biocaml_internal_utils.Pos.t * string list * string option
| `missing_chrom_value of Biocaml_internal_utils.Pos.t * string
| `missing_start_value of Biocaml_internal_utils.Pos.t * string
| `missing_step_value of Biocaml_internal_utils.Pos.t * string
| `not_in_fixed_step_state
| `not_in_variable_step_state
| `unrecognizable_line of
Biocaml_internal_utils.Pos.t * string list
| `wrong_bed_graph_value of Biocaml_internal_utils.Pos.t * string
| `wrong_fixed_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_span_value of Biocaml_internal_utils.Pos.t * string
| `wrong_start_value of Biocaml_internal_utils.Pos.t * string
| `wrong_step_value of Biocaml_internal_utils.Pos.t * string
| `wrong_variable_step_value of
Biocaml_internal_utils.Pos.t * string ]
val parsing_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.Error.parsing
val sexp_of_parsing : Biocaml_wig.Error.parsing -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.Error.t
val sexp_of_t : Biocaml_wig.Error.t -> Sexplib.Sexp.t
val to_bed_graph_of_sexp :
Sexplib.Sexp.t -> Biocaml_wig.Error.to_bed_graph
val sexp_of_to_bed_graph :
Biocaml_wig.Error.to_bed_graph -> Sexplib.Sexp.t
end
module Tags :
sig
type t = { allow_empty_lines : bool; sharp_comments : bool; }
val default : Biocaml_wig.Tags.t
val of_string :
string ->
(Biocaml_wig.Tags.t, [> `wig of [> `tags_of_string of exn ] ])
Biocaml_internal_utils.Result.t
val to_string : Biocaml_wig.Tags.t -> string
val t_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.Tags.t
val sexp_of_t : Biocaml_wig.Tags.t -> Sexplib.Sexp.t
end
exception Error of Biocaml_wig.Error.t
val in_channel_to_item_stream :
?buffer_size:int ->
?filename:string ->
?tags:Biocaml_wig.Tags.t ->
Pervasives.in_channel ->
(Biocaml_wig.item, Biocaml_wig.Error.t) Biocaml_internal_utils.Result.t
Biocaml_internal_utils.Stream.t
val in_channel_to_item_stream_exn :
?buffer_size:int ->
?filename:string ->
?tags:Biocaml_wig.Tags.t ->
Pervasives.in_channel -> Biocaml_wig.item Biocaml_internal_utils.Stream.t
val in_channel_to_bed_graph :
?buffer_size:int ->
?filename:string ->
?tags:Biocaml_wig.Tags.t ->
Pervasives.in_channel ->
(Biocaml_wig.bed_graph_value, Biocaml_wig.Error.t)
Biocaml_internal_utils.Result.t Biocaml_internal_utils.Stream.t
val in_channel_to_bed_graph_exn :
?buffer_size:int ->
?filename:string ->
?tags:Biocaml_wig.Tags.t ->
Pervasives.in_channel ->
Biocaml_wig.bed_graph_value Biocaml_internal_utils.Stream.t
val item_to_string : ?tags:Biocaml_wig.Tags.t -> Biocaml_wig.item -> string
module Transform :
sig
val string_to_item :
?filename:string ->
?tags:Biocaml_wig.Tags.t ->
unit ->
(string,
(Biocaml_wig.item, [> Biocaml_wig.Error.parsing ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val item_to_string :
?tags:Biocaml_wig.Tags.t ->
unit -> (Biocaml_wig.item, string) Biocaml_transform.t
val item_to_bed_graph :
unit ->
(Biocaml_wig.item,
(Biocaml_wig.bed_graph_value, [> Biocaml_wig.Error.to_bed_graph ])
Biocaml_internal_utils.Result.t)
Biocaml_transform.t
end
val comment_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.comment
val sexp_of_comment : Biocaml_wig.comment -> Sexplib.Sexp.t
val variable_step_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.variable_step
val sexp_of_variable_step : Biocaml_wig.variable_step -> Sexplib.Sexp.t
val fixed_step_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.fixed_step
val sexp_of_fixed_step : Biocaml_wig.fixed_step -> Sexplib.Sexp.t
val bed_graph_value_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.bed_graph_value
val sexp_of_bed_graph_value : Biocaml_wig.bed_graph_value -> Sexplib.Sexp.t
val item_of_sexp : Sexplib.Sexp.t -> Biocaml_wig.item
val sexp_of_item : Biocaml_wig.item -> Sexplib.Sexp.t
end