calour.filtering.
is_prevalent
(data, axis, cutoff=1, fraction=0.1)[source]¶Check the prevalent of values above the cutoff.
present (abundance >= cutoff) in at least “fraction” of samples
Parameters: |
|
---|---|
Returns: | bool array with True if prevalence >= cutoff. |
Return type: | np.ndarray |
Examples
>>> x = is_prevalent(np.array([[0, 1, 2], [0, 1, 2]]), 0, 2, 0.51)
>>> x.tolist()
[False, False, True]
>>> x = is_prevalent(np.array([[0, 1, 2], [0, 2, 2]]), 0, 2, 0.5)
>>> x.tolist()
[False, True, True]