package biocaml
Install
Dune Dependency
Authors
Maintainers
Sources
md5=497e3f2f7128a6ca347d66848da38a3d
sha512=4a76ebbafda3bc944afaff40d69791dfe153a0638ef5d7e6e1bc962b7f991d9545cd0af2d7930b39f8b31dbf067d0603cfa03d9b7a49396ab1ae452df47fd1f3
doc/biocaml.unix/Biocaml_unix/Seq/index.html
Module Biocaml_unix.Seq
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.
val of_string : string -> t
Make sequence from string. Raise Bad
if unsuccessful.
val of_buffer : Core_kernel.Buffer.t -> t
Make sequence from buffer. Raise Bad
if unsuccessful.
val nth : t -> int -> char
nth t i
returns the i
th nucleic acid in sequence t
. Raise Failure
if i
is out of range.
val length : t -> int
Length of sequence.
val to_string : t -> string
Return string representation of sequence. Answer can be successfully converted back using of_string
.
True if given character represents one of the allowed nucleic acid codes, case-insensitive.
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
.
val fold_left : ('a -> char -> 'a) -> 'a -> t -> 'a
see String.fold_left.
val fold_lefti : ('a -> int -> char -> 'a) -> 'a -> t -> 'a
String.fold_lefti
Unsafe Sequences
val of_buffer_unsafe : Core_kernel.Buffer.t -> t
val 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.