package biocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Biocaml_unix.Fasta end
type header = private string list

A header is a list of comment lines.

type item = private Biocaml_unix.Fasta.item = {
  1. description : string;
  2. sequence : string;
}
type fmt = Biocaml_unix.Fasta.fmt = {
  1. allow_sharp_comments : bool;
  2. allow_semicolon_comments : bool;
  3. allow_empty_lines : bool;
  4. comments_only_at_top : bool;
  5. max_line_length : int option;
  6. alphabet : string option;
}
val default_fmt : fmt

Low-level Parsing

type item0 = private [<
  1. | `Comment of string
  2. | `Empty_line
  3. | `Description of string
  4. | `Partial_sequence of string
]

An item0 is more raw than item. It is useful for parsing files with large sequences because you get the sequence in smaller pieces.

  • `Comment _ - Single comment line without the final newline. Initial comment char is retained.
  • `Empty_line - Got a line with only whitespace characters. The contents are not provided.
  • `Description _ - Single description line without the initial '>' nor final newline.
  • `Partial_sequence _ - Multiple sequential partial sequences comprise the sequence of a single item.
val parse_item0 : ?allow_sharp_comments:bool -> ?allow_semicolon_comments:bool -> ?allow_empty_lines:bool -> ?max_line_length:int -> ?alphabet:string -> Biocaml_unix.Line.t -> item0 Core.Or_error.t
val sequence_to_int_list : string -> int list
val read0 : ?start:Biocaml_unix.Pos.t -> ?allow_sharp_comments:bool -> ?allow_semicolon_comments:bool -> ?allow_empty_lines:bool -> ?max_line_length:int -> ?alphabet:string -> Core.In_channel.t -> item0 CFStream.Stream.t
val with_file : ?fmt:fmt -> string -> f:(header -> item CFStream.Stream.t -> 'a) -> 'b