package biocaml

  1. Overview
  2. Docs
The OCaml Bioinformatics Library

Install

Dune Dependency

Authors

Maintainers

Sources

biocaml-0.11.2.tbz
sha256=fae219e66db06f81f3fd7d9e44717ccf2d6d85701adb12004ab4ae6d3359dd2d
sha512=f6abd60dac2e02777be81ce3b5acdc0db23b3fa06731f5b2d0b32e6ecc9305fe64f407bbd95a3a9488b14d0a7ac7c41c73a7e18c329a8f18febfc8fd50eccbc6

doc/biocaml.unix/Biocaml_unix/Seq/index.html

Module Biocaml_unix.SeqSource

Nucleic acid sequences. A nucleic acid code is any of A, C, G, T, U, R, Y, K, M, S, W, B, D, H, V, N, or X. See IUB/IUPAC standards for further information. Gaps are not supported. Internal representation uses uppercase, but constructors are case-insensitive. By convention the first nucleic acid in a sequence is numbered 1.

Sourcetype t

Type of a sequence

Sourceexception Bad of string

Raised to indicate ill-formed sequence.

Sourceval of_string : string -> t

Make sequence from string. Raise Bad if unsuccessful.

Sourceval of_buffer : Core.Buffer.t -> t

Make sequence from buffer. Raise Bad if unsuccessful.

Sourceval nth : t -> int -> char

nth t i returns the ith nucleic acid in sequence t. Raise Failure if i is out of range.

Sourceval length : t -> int

Length of sequence.

Sourceval to_string : t -> string

Return string representation of sequence. Answer can be successfully converted back using of_string.

Sourceval is_nucleic_acid : char -> bool

True if given character represents one of the allowed nucleic acid codes, case-insensitive.

Sourceval slice : int -> int -> t -> t

slice first last t returns the sub-sequence, or slice, of t starting from index first to last (inclusive). Raise Failure if indices out of range or if first > last.

Sourceval fold_left : ('a -> char -> 'a) -> 'a -> t -> 'a

see String.fold_left.

Sourceval fold_lefti : ('a -> int -> char -> 'a) -> 'a -> t -> 'a

String.fold_lefti

Unsafe Sequences
Sourceval of_buffer_unsafe : Core.Buffer.t -> t
Sourceval of_string_unsafe : string -> t

Make a sequence from given buffer or string. Every character in input should satisfy is_nucleic_acid, else returned sequence is ill-formed and behavior of operations on it are undefined.

OCaml

Innovation. Community. Security.