Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Information/Information.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ export # MIToS.MSA
# CorrectedMutualInformation
buslje09,
BLMI,
# PSSM
AbstractPositionSpecificMatrix,
PositionFrequencyMatrix,
position_frequency_matrix,
PositionSpecificProbabilityMatrix,
position_specific_probability_matrix,
PositionSpecificScoringMatrix,
position_specific_scoring_matrix,
ProfileScore,
score_sequence,
# Gaps
gap_union_percentage,
gap_intersection_percentage,
Expand All @@ -119,5 +129,6 @@ include("Corrections.jl")
include("CorrectedMutualInformation.jl")
include("Gaps.jl")
include("Externals.jl")
include("PSSM.jl")

end
7 changes: 4 additions & 3 deletions src/Information/InformationMeasures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ function _gettablearray(
gettablearray(table)
end

_gettablearray(table::Array{T,N}) where {T,N} = table
_gettablearray(table::AbstractArray{T,N}) where {T,N} = table

const _DOC_KL_KARG = """
You can use the keyword argument `background` to set the background distribution. This
argument can take an `Array`, `Probabilities`, or `ContingencyTable` object. The background
argument can take an `AbstractArray`, `Probabilities`, or `ContingencyTable` object. The background
distribution must have the same size and alphabet as the probabilities. The default is the
`BLOSUM62_Pi` table. $_DOC_LOG_BASE
"""
Expand Down Expand Up @@ -234,9 +234,10 @@ end
# Kullback-Leibler for MSA

"""
kullback_leibler(msa::AbstractArray{Residue}; background::Union{Array{T,N}, Probabilities{T,N,A}, ContingencyTable{T,N,A}}=BLOSUM62_Pi, base::Number=ℯ, kargs...)
kullback_leibler(msa::AbstractArray{Residue}; background::AbstractArray=BLOSUM62_Pi, base::Number=ℯ, rank::Int=1, kargs...)

It calculates the Kullback-Leibler (KL) divergence from a multiple sequence alignment (MSA).
Currently, `rank` must be `1`.
$_DOC_KL_KARG The other keyword arguments are passed to the [`mapfreq`](@ref) function.
"""
function kullback_leibler(
Expand Down
Loading
Loading