module Transform: sig .. end
Low-level transforms.
type 'a raw_item = [ `comment of string | `header of string | `partial_sequence of 'a ]
Lowest level items parsed by this module:
`comment _ - a single comment line without the final
newline.
`header _ - a single header line without the initial '>',
whitespace following this, nor final newline.
`partial_sequence _ - either a sequence of characters,
represented as a string, or a sequence of space separated
integers, represented by an int list. The value does not
necessarily carry the complete content associated with a
header. It may be only part of the sequence, which can be useful
for files with large sequences (e.g. genomic sequence
files).
char_seq parsers
val string_to_char_seq_raw_item : ?filename:string ->
?pedantic:bool ->
?sharp_comments:bool ->
?semicolon_comments:bool ->
unit ->
(string,
(Biocaml_fasta.char_seq raw_item,
Biocaml_fasta.Error.t)
Core.Result.t)
Biocaml_transform.t
Parse a stream of strings as a char_seq FASTA file.
val char_seq_raw_item_to_item : unit ->
(Biocaml_fasta.char_seq raw_item,
(Biocaml_fasta.char_seq Biocaml_fasta.item,
[ `unnamed_char_seq of Biocaml_fasta.char_seq ])
Core.Result.t)
Biocaml_transform.t
Aggregate a stream of FASTA char_seq raw_items into char_seq
items. Comments are discared.
char_seq unparsers
val char_seq_item_to_raw_item : ?items_per_line:int ->
unit ->
(Biocaml_fasta.char_seq Biocaml_fasta.item,
Biocaml_fasta.char_seq raw_item)
Biocaml_transform.t
Cut a stream of char_seq items into a stream of char_seq
raw_items, where lines are cut at items_per_line
characters (default 80).
val char_seq_raw_item_to_string : ?comment_char:char ->
unit ->
(Biocaml_fasta.char_seq raw_item, string)
Biocaml_transform.t
Print char_seq items. Comments will be ignored if
comment_char is omitted.
int_seq parsers
val string_to_int_seq_raw_item : ?filename:string ->
?pedantic:bool ->
?sharp_comments:bool ->
?semicolon_comments:bool ->
unit ->
(string,
(Biocaml_fasta.int_seq raw_item,
Biocaml_fasta.Error.t)
Core.Result.t)
Biocaml_transform.t
Parse a stream of strings as an int_seq FASTA file.
val int_seq_raw_item_to_item : unit ->
(Biocaml_fasta.int_seq raw_item,
(Biocaml_fasta.int_seq Biocaml_fasta.item,
[ `unnamed_int_seq of Biocaml_fasta.int_seq ])
Core.Result.t)
Biocaml_transform.t
Aggregate a stream of FASTA int_seq raw_items into int_seq
items. Comments are discared.
int_seq unparsers
val int_seq_item_to_raw_item : ?items_per_line:int ->
unit ->
(Biocaml_fasta.int_seq Biocaml_fasta.item,
Biocaml_fasta.int_seq raw_item)
Biocaml_transform.t
Cut a stream of int_seq items into a stream of int_seq
raw_items, where lines are cut at items_per_line integers
(default 27).
val int_seq_raw_item_to_string : ?comment_char:char ->
unit ->
(Biocaml_fasta.int_seq raw_item, string)
Biocaml_transform.t
Print int_seq items. Comments will be ignored if
comment_char is omitted.
S-expressions
val sexp_of_raw_item : ('a -> Sexplib.Sexp.t) ->
'a raw_item -> Sexplib.Sexp.t
val raw_item_of_sexp : (Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a raw_item
val raw_item_of_sexp__ : (Sexplib.Sexp.t -> 'a) ->
Sexplib.Sexp.t -> 'a raw_item