Alignment

Types

PanGraph.Graphs.Align.CladeMethod
Clade(distance, names; algo=:nj)

Generate a tree from a matrix of pairwise distances distance. The names of leafs are given by an array of strings names. algo dictates the algorithm used to transform the distance matrix into a tree. Currently on neighbor joining (:nj) is supported.

source
PanGraph.Graphs.Align.MessageType
mutable struct Clade
	name   :: String
	parent :: Union{Clade,Nothing}
	left   :: Union{Clade,Nothing}
	right  :: Union{Clade,Nothing}
	graph  :: Channel{Tuple{Graph,Int}}
end

Clade is a node (internal or leaf) of a binary guide tree used to order pairwise alignments associated to a multiple genome alignment in progress. name is only non-empty for leaf nodes. parent is nothing for the root node. graph is a 0-sized channel that is used as a message passing primitive in alignment. It contains the graph and an index used to decide the order of items in a pair in pairwise graph merge.

source

Functions

PanGraph.Graphs.Align.alignMethod
align(aligner::Function, Gs::Graph...; compare=Mash.distance, energy=(hit)->(-Inf), minblock=100, reference=nothing, maxiter=100, verbose=false, debugdir=nothing)

Aligns a collection of graphs Gs using the specified aligner function to recover hits. Graphs are aligned following an internal guide tree, generated using kmer distance.

energy is to be a function that takes an alignment between two blocks and produces a score. The lower the score, the better the alignment. Only negative energies are considered.

minblock is the minimum size block that will be produced from the algorithm. maxiter is maximum number of duplications that will be considered during this alignment.

compare is the function to be used to generate pairwise distances that generate the internal guide tree.

source
PanGraph.Graphs.Align.align_pairMethod
align_pair(G₁::Graph, G₂::Graph, energy::Function, minblock::Int, verify::Function, verbose::Bool; maxiter=100)

Align graph G₁ to graph G₂ by looking for homology between consensus sequences of blocks. This is a low-level function.

energy is to be a function that takes an alignment between two blocks and produces a score. The lower the score, the better the alignment. Only negative energies are considered.

minblock is the minimum size block that will be produced from the algorithm. maxiter is maximum number of duplications that will be considered during this alignment.

source
PanGraph.Graphs.Align.align_selfMethod
align_self(G₁::Graph, energy::Function, minblock::Int, verify::Function, verbose::Bool; maxiter=100)

Align graph G₁ to itself by looking for homology between blocks. This is a low-level function.

energy is to be a function that takes an alignment between two blocks and produces a score. The lower the score, the better the alignment. Only negative energies are considered.

minblock is the minimum size block that will be produced from the algorithm. maxiter is maximum number of duplications that will be considered during this alignment.

source
PanGraph.Graphs.Align.njMethod
nj(distance, names)

Lower-level function. Generate a tree from a matrix of pairwise distances distance. The names of leafs are given by an array of strings names. Uses neighbor joining.

source
PanGraph.Graphs.Align.orderingMethod
ordering(compare, Gs...)

Return a guide tree based upon distances computed from a collection of graphs Gs, using method compare. The signature of compare is expected to be compare(G::Graphs....) -> distance, names. Graphs Gs... are expected to be singleton graphs.

source