sig
type record =
Biocaml_gff.record = {
seqname : string;
source : string option;
feature : string option;
pos : int * int;
score : float option;
strand : [ `minus | `not_applicable | `plus | `unknown ];
phase : int option;
attributes : (string * string list) list;
}
type item = [ `comment of string | `record of record ]
module Error :
sig
type parsing =
[ `cannot_parse_float of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_int of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_strand of Biocaml_internal_utils.Pos.t * string
| `cannot_parse_string 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
| `wrong_attributes of Biocaml_internal_utils.Pos.t * string
| `wrong_row of Biocaml_internal_utils.Pos.t * string
| `wrong_url_escaping of Biocaml_internal_utils.Pos.t * string ]
type t = parsing
val parsing_of_sexp : Sexplib.Sexp.t -> parsing
val sexp_of_parsing : parsing -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tags :
sig
type t =
Biocaml_gff.Tags.t = {
version : [ `three | `two ];
allow_empty_lines : bool;
sharp_comments : bool;
}
val default : t
val of_string :
string ->
(t, [> `gff of [> `tags_of_string of exn ] ])
Biocaml_internal_utils.Result.t
val to_string : t -> string
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
exception Error of Error.t
val in_channel_to_item_stream :
?buffer_size:int ->
?filename:string ->
?tags:Tags.t ->
in_channel ->
(item, [> Error.parsing ]) Biocaml_internal_utils.Result.t
Biocaml_internal_utils.Stream.t
val in_channel_to_item_stream_exn :
?buffer_size:int ->
?tags:Tags.t -> in_channel -> item Biocaml_internal_utils.Stream.t
val item_to_string : ?tags:Tags.t -> item -> string
module Transform :
sig
val string_to_item :
?filename:string ->
tags:Tags.t ->
unit ->
(string, (item, [> Error.parsing ]) Biocaml_internal_utils.Result.t)
Biocaml_transform.t
val item_to_string :
tags:Tags.t -> unit -> (item, string) Biocaml_transform.t
end
val record_of_sexp : Sexplib.Sexp.t -> record
val sexp_of_record : record -> Sexplib.Sexp.t
val item_of_sexp : Sexplib.Sexp.t -> item
val sexp_of_item : item -> Sexplib.Sexp.t
end