let string_to_wig ?filename () =
let wig_parser =
Wig.Transform.string_to_item ?filename () in
embed_parser ?filename
(*
let track_parser = string_to_string_content ?filename () in
Biocaml_transform.filter_compose
track_parser
~destruct:(function
| Ok (`content s) -> `Yes (s ^ "\n")
| Ok (`track _) | Ok (`browser _) | Ok (`comment _)
| Error _ as n -> `No n) *)
wig_parser
~reconstruct:(function
| `bypassed (Ok f) -> Ok (f :> wig_t)
| `bypassed (Error f) -> Error (f :> [> wig_parser_error])
| `transformed (Ok o) -> Ok (o :> wig_t)
| `transformed (Error e) -> Error (e :> [> wig_parser_error]))