skbio.alignment.Alignment.distribution_stats

Alignment.distribution_stats(center_f=<function mean at 0x2ba869b7b848>, spread_f=<function std at 0x2ba869b7b8c0>)[source]

Return sequence count, and center and spread of sequence lengths

Parameters:

center_f : function

Should take a list-like object and return a single value representing the center of the distribution.

spread_f : function

Should take a list-like object and return a single value representing the spread of the distribution.

Returns:

tuple of (int, float, float)

The sequence count, center of length distribution, spread of length distribution.

Notes

Alternatives for center_f and spread_f could be median and median absolute deviation.

Examples

>>> from skbio.alignment import SequenceCollection
>>> from skbio.sequence import DNA
>>> sequences = [DNA('ACCGT', id="seq1"),
...              DNA('AACCGGT', id="seq2")]
>>> s1 = SequenceCollection(sequences)
>>> s1.distribution_stats()
(2, 6.0, 1.0)