Module lib_dp

Dynamic Programming library.

Copyright © 2016-2017 Jörgen Brandt

Version: 0.1.0

Authors: Jörgen Brandt (joergen.brandt@onlinehome.de).

Description

Dynamic Programming library.

Data Types

del()

del() = {del, [term()]}

edit_script()

edit_script() = [{term(), term()}]

ins()

ins() = {ins, [term()]}

match()

match() = {match, [term()]}

mismatch()

mismatch() = {mismatch, [term()], [term()]}

pos_pair()

pos_pair() = {non_neg_integer(), non_neg_integer()}

score_lnk()

score_lnk() = {number(), pos_pair() | undef}

score_table()

score_table() = #{{pos_integer(), pos_integer()} => score_lnk()}

strategy()

strategy() = global | global_endfree | local

subst_fun()

subst_fun() = fun((term(), term()) -> number())

summary_script()

summary_script() = [match() | mismatch() | ins() | del()]

Function Index

editscr/4Constructs an edit script from two sequences and the Dynamic Programming score table.
extend_backward/4Extends a local alignment from a given position in backward direction.
extend_forward/4Extends a local alignment from a given position in forward direction.
find_horizontal_end/1Finds the optimal end in the second sequence in a global end-space free alignment.
find_local_matches/4
find_max_score/3Finds the position in a Dynamic Programming score table with the highest score.
find_vertical_end/1Finds the optimal end in the first sequence in a global end-space free alignment.
get_score/2
new/1A simplified version of the function new/3 to construct a stateful module holding the parameters for the Dynamic Programming scheme.
new/3Constructs a new stateful module holding the parameters for the Dynamic Programming scheme.
print_tbl/1
scoretbl/3Creates the Dynamic Programming score table from two sequences.
sumscr/1Creates a summary script from an edit script.

Function Details

editscr/4

editscr(TLst1, TLst2, Tbl, ModArg) -> edit_script()

Constructs an edit script from two sequences and the Dynamic Programming score table.

extend_backward/4

extend_backward(Pos, ScopeStart, Tbl, ModArg) -> any()

Extends a local alignment from a given position in backward direction.

extend_forward/4

extend_forward(Pos, ScopeEnd, Tbl, ModArg) -> any()

Extends a local alignment from a given position in forward direction.

find_horizontal_end/1

find_horizontal_end(Tbl::score_table()) -> {pos_pair(), number()}

Finds the optimal end in the second sequence in a global end-space free alignment.

The function produces a pair consisting of a position pair and its score.

find_local_matches/4

find_local_matches(ScopeStart, ScopeEnd, Tbl, ModArg) -> any()

find_max_score/3

find_max_score(ScopeStart, ScopeEnd, Tbl) -> {pos_pair(), number()}

Finds the position in a Dynamic Programming score table with the highest score.

find_vertical_end/1

find_vertical_end(Tbl::score_table()) -> {pos_pair(), number()}

Finds the optimal end in the first sequence in a global end-space free alignment.

The function produces a pair consisting of a position pair and its score.

get_score/2

get_score(Tbl, Lib_dp) -> any()

new/1

new(Strategy::strategy()) -> #lib_dp{}

A simplified version of the function new/3 to construct a stateful module holding the parameters for the Dynamic Programming scheme.

Only a strategy needs to be provided being either the symbol global, global_endfree, or local.

new/3

new(Strategy, SubstFun, Indel) -> #lib_dp{}

Constructs a new stateful module holding the parameters for the Dynamic Programming scheme.

The stateful module is initialized with

A simpler initialization function where only the the strategy has to be provided is new/1.

The returned stateful module is used with the functions scoretbl/3 to create a score table from two sequences and editscr/4 to construct an edit script from a score table.

print_tbl/1

print_tbl(Tbl) -> any()

scoretbl/3

scoretbl(TLst1, TLst2, ModArg) -> any()

Creates the Dynamic Programming score table from two sequences.

sumscr/1

sumscr(T::edit_script()) -> summary_script()

Creates a summary script from an edit script.


Generated by EDoc