ipa_utils

Utilities for implementing Iterative Pairing Algorithm (IPA) routines using DiffPaSS.

Type aliases

BootstrapList = list  # List indexed by bootstrap iteration
GradientDescentList = list  # List indexed by gradient descent iteration
GroupByGroupList = list  # List indexed by group index

IndexPair = tuple[int, int]  # Pair of indices
IndexPairsInGroup = list[IndexPair]  # Pairs of indices in a group of sequences
IndexPairsInGroups = list[IndexPairsInGroup]  # Pairs of indices in groups of sequences

source

get_robust_pairs

 get_robust_pairs (bootstrap_results:diffpass.base.DiffPaSSResults,
                   cutoff:float=1.0)

Get robust pairs of indices from a DiffPaSSResults object.

Type Default Details
bootstrap_results DiffPaSSResults E.g. results of a run of DiffPaSSModel.fit_bootstrap
cutoff float 1.0 Fraction of iterations a pair must be present in to be considered robust
Returns list Robust pairs of indices in each group of sequences