Skip to content

v2.22.0

Compare
Choose a tag to compare
@github-actions github-actions released this 01 Jul 13:20
· 89 commits to master since this release

MIToS v2.22.0

Diff since v2.21.0

This versions introduces several breaking changes to improve the usability of the
Information module. The main changes are:

  • [Breaking change] The Information module deprecates the Counts type in favor of
    the new Frequencies type. The new type as the same signature and behavior as the old one.

  • [Breaking change] The count function on sequences has been deprecated in favor of the
    frequencies function, which has the same signature and behavior as the old one.

  • [Breaking change] The count! function is deprecated in favor of frequencies!.
    The new function use keyword arguments to define the weights and pseudocounts. As an
    example of migration, count!(table, weights, pseudocounts, seqs...) should be replaced
    by frequencies!(table, seqs..., weights=weights, pseudocounts=pseudocounts).

  • [Breaking change] The probabilities! method using positional arguments for the
    weights, pseudocounts and pseudofrequencies is deprecated in favor the one that uses
    keyword arguments. As an example of migration,
    probabilities!(table, weights, pseudocounts, pseudofrequencies, seqs...)
    should be replaced by
    probabilities!(table, seqs..., weights=weights, pseudocounts=pseudocounts, pseudofrequencies=pseudofrequencies).

  • [Breaking change] The Information has deprecated the entropy method on
    Frequencies and Probabilities in favor of the shannon_entropy function. The
    definition of the base is now done using the base keyword argument. As an example of
    migration, entropy(p, 2) should be replaced by shannon_entropy(p, base=2).

  • [Breaking change] The marginal_entropy methods based on positional arguments are
    deprecated in favor of a method relying on the margin and base keyword arguments.
    As an example of migration, marginal_entropy(p, 2, 2.0) should be replaced by
    marginal_entropy(p, margin=2, base=2.0).

  • [Breaking change] The mutual_information method based on positional arguments is
    deprecated in favor of a method relying on the base keyword argument. As an example of
    migration, mutual_information(p, 2) should be replaced by mutual_information(p, base=2).

  • [Breaking change] The mapcolpairfreq! and mapseqpairfreq! functions now uses the
    boolean usediagonal keyword argument to indicate if the function should be applied to
    the diagonal elements of the matrix (the default is true). Before, this was done passing
    Val{true} or Val{false} as the last positional argument.

  • The mapcolfreq!, mapseqfreq!, mapcolpairfreq!, and mapseqpairfreq! methods using
    keyword arguments, now pass the extra keyword arguments to the mapped function.

  • The Information module now exports the mapfreq function that offers a more high-level
    interface to the mapcolfreq!, mapseqfreq!, mapcolpairfreq!, and mapseqpairfreq!
    functions. This function allows the user to map a function to the residue frequencies or
    probabilities of the columns or sequences of an MSA. When rank = 2, the function is
    applied to pairs of sequences or columns.

  • The Information module now exports methods of the shannon_entropy, kullback_leibler,
    mutual_information, and normalized_mutual_information functions that take an
    AbstractArray{Residue} as input, e.g. an MSA. Those methods use the mapfreq function
    under the hood to ease the calculation of the information measures on MSAs.

  • The frequencies!, frequencies, probabilities!, and probabilities functions now
    accept arrays of Residues of any dimension. Therefore, there is no need to use the
    vec function to convert the arrays to vectors.

  • The MSA module now exports the WeightType union type to represent weights.