Position-weight matrix
This module can be used to create position-weight matrices (PWM)
to describe a DNA motif. Such matrices can then be searched on
a DNA sequence, given a threshold for alignment score.
module Biocaml_pwm:
sig
typecount_matrix =
int array array
typebackground = private
float array
val flat_background : unit -> background
val background_of_sequence : string -> float -> background
background_of_sequence seq pc
estimates the base
frequency in seq
using pc
as pseudo-counts. Typical
value for pc
is 0.1
.typet = private
float array array
val make : count_matrix -> background -> t
val tandem : ?orientation:[ `direct | `everted | `inverted ] ->
spacer:int ->
count_matrix ->
count_matrix -> background -> t
tandem orientation spacer cm1 cm2 bg
builds a PWM by constructing
a composite motif: it builds mat1
the PWM from cm1
under background bg
(resp. mat2
from cm2
under bg
), then concatenates mat1
and mat2
with
spacer
non scoring columns in betweenval reverse_complement : t -> t
val scan : t -> string -> float -> (int * float) list
scan mat seq tol
returns the list of positions (with
corresponding scores) such that the alignment score
of mat
is superior to tol
end