mkt.databases.pssm.column_information_content

mkt.databases.pssm.column_information_content(sequences: list[str], scorer: SubstitutionPseudocounts | None = None, gap_chars: str = '-X', weights: list[float] | None = None) list[float | None][source]

Per-column background-relative information content (bits) for an MSA.

Convenience wrapper mirroring column_conservation(): builds the weighted per-column counts (column_counts()) and scores each column with SubstitutionPseudocounts.column_information(), so any subset of aligned sequences (a whole MSA, a clade, a bootstrap resample) is scored through the single shared implementation. Pass henikoff_weights() as weights to down-weight redundant subfamilies, and a scorer with a dataset-specific background for “surprising relative to this dataset”.

Parameters:
  • sequences (list[str]) – Aligned sequence strings of equal length.

  • scorer (SubstitutionPseudocounts | None) – Pseudocount/information scorer; a default SubstitutionPseudocounts (BLOSUM62, Swiss-Prot background) is built when None.

  • gap_chars (str) – Characters treated as gap/unknown and excluded (default: STR_GAP_CHARS).

  • weights (list[float] | None) – Optional per-sequence weights (default: None -> unweighted).

Returns:

One information-content value (bits) per column; None for an all-gap column.

Return type:

list[float | None]