Reference

MakieSequenceLogos._interpret_contourMethod
_interpret_contour(pts, tags) -> Vector{Point2f}

Walk one closed contour and convert it to a dense polyline, approximating any quadratic / cubic Bézier arcs with short line segments.

Uses a two-phase approach for robustness:

  1. Expand — make implicit on-curve midpoints between consecutive conic control points explicit, producing a clean point+tag list.
  2. Linearise — rotate so the list starts with an ON point, append the starting point at the end for closure, then walk linearly consuming ON / CONIC+ON / CUBIC+CUBIC+ON segments.
source
MakieSequenceLogos._load_outline_dataMethod
_load_outline_data(face, char) -> (points, tags, contour_ends)

Load a glyph and copy its outline data out of FreeType while the face lock is held. Returns Julia-owned arrays so no dangling pointers remain.

source
MakieSequenceLogos.information_contentMethod
information_content(sequences, alphabet; pseudocount=0.0, background=nothing) -> Matrix{Float64}

Information Content matrix (q × L). IC[c,i] = P[c,i] * KL_i where KL_i = Σ_c P[c,i] log2(P[c,i] / Q[c]).

source
MakieSequenceLogos.pfmMethod
pfm(sequences, alphabet) -> Matrix{Float64}

Position Frequency Matrix (raw counts). Returns a q × L matrix (q = length(alphabet), L = sequence length).

source
MakieSequenceLogos.ppmMethod
ppm(sequences, alphabet; pseudocount=0.0) -> Matrix{Float64}

Position Probability Matrix (q × L). P[c,i] = (N[c,i] + pseudocount) / (N_i + q * pseudocount)

source
MakieSequenceLogos.pwmMethod
pwm(sequences, alphabet; pseudocount=0.001, background=nothing) -> Matrix{Float64}

Position Weight Matrix (log-odds, q × L). W[c,i] = log2(P[c,i] / Q[c])

source
MakieSequenceLogos.seqlogo!Method
seqlogo!(ax::Axis, matrix::AbstractMatrix, alphabet::AbstractVector{Char}; kwargs...)

Plot a sequence logo onto an existing Makie Axis.

matrix has size (q, L) where q = length(alphabet) and L is the number of positions. Each entry encodes the height of the corresponding character at that position.

Keyword arguments

  • color_scheme: a Symbol (:classic, :dna, :protein, …) or Dict{Char, <:Colorant}.
  • font: path to a .ttf / .otf file. Default: NotoSans-Bold bundled with Makie.
  • sort_letters: stack letters bottom-to-top by ascending height (default true).
  • ylabel: y-axis label (default "Information content (bits)").
source
MakieSequenceLogos.seqlogoMethod
seqlogo(matrix, alphabet; figsize=(800,300), kwargs...) -> Figure

Create a new Figure, plot the sequence logo, and return it.

source
MakieSequenceLogos.seqlogoMethod
seqlogo(sequences::Vector{String}; alphabet_name=:dna, matrix_type=:information, kwargs...) -> Figure

Build a matrix from aligned sequences and plot a sequence logo.

Keyword arguments

  • alphabet_name: :dna, :rna, or :protein.
  • matrix_type: :information (default), :probability, :counts, or :weight.
  • pseudocount: pseudocount added during probability estimation (default 0.0).
  • background: optional background frequency vector.
  • Other keyword arguments are forwarded to seqlogo!.
source