Reference
MakieSequenceLogos._default_font_path — Method
_default_font_path() -> StringReturn the absolute path to the bold sans-serif font bundled with Makie.
MakieSequenceLogos._interpret_contour — Method
_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:
- Expand — make implicit on-curve midpoints between consecutive conic control points explicit, producing a clean point+tag list.
- 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.
MakieSequenceLogos._load_font — Method
_load_font(path_or_name::String) -> FTFontLoad a font face from a file path. Faces are cached for reuse.
MakieSequenceLogos._load_outline_data — Method
_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.
MakieSequenceLogos.information_content — Method
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]).
MakieSequenceLogos.pfm — Method
pfm(sequences, alphabet) -> Matrix{Float64}Position Frequency Matrix (raw counts). Returns a q × L matrix (q = length(alphabet), L = sequence length).
MakieSequenceLogos.ppm — Method
ppm(sequences, alphabet; pseudocount=0.0) -> Matrix{Float64}Position Probability Matrix (q × L). P[c,i] = (N[c,i] + pseudocount) / (N_i + q * pseudocount)
MakieSequenceLogos.pwm — Method
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])
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: aSymbol(:classic,:dna,:protein, …) orDict{Char, <:Colorant}.font: path to a.ttf/.otffile. Default: NotoSans-Bold bundled with Makie.sort_letters: stack letters bottom-to-top by ascending height (defaulttrue).ylabel: y-axis label (default"Information content (bits)").
MakieSequenceLogos.seqlogo — Method
seqlogo(matrix, alphabet; figsize=(800,300), kwargs...) -> FigureCreate a new Figure, plot the sequence logo, and return it.
MakieSequenceLogos.seqlogo — Method
seqlogo(sequences::Vector{String}; alphabet_name=:dna, matrix_type=:information, kwargs...) -> FigureBuild 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 (default0.0).background: optional background frequency vector.- Other keyword arguments are forwarded to
seqlogo!.
MakieSequenceLogos.validate_matrix — Method
validate_matrix(matrix, alphabet) -> Matrix{Float64}Check that matrix is q × L and return a dense Float64 copy.