superexacttestpy.tl.mset

superexacttestpy.tl.mset(data, n, lower_tail=True, logp=False)

A wrapper to call cpsets

Parameters:
data : list

List of genetic sets

n : int

Background-size

lower_tail : bool

If TRUE (default), the probability is P[overlap < m], otherwise, P[overlap >= m], where m is the number of elements shared by all sets.

logp : bool

If TRUE, probabilities p are given as log(p).

Returns:

A dictionary with the following keys:
”Intersection”int

The number of intersections between all sets

”FE”float

The fold enrichment

”p-value”float

The p-value to have this intersection number randomly generated

Return type:

dict

Example

>>> data = [["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q"],
    ["L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],
    ["H","I","J","K","L","M","N","O","P","Q"]]
>>> mset(data,1000)
... {
    'Intersection': ['L', 'P', 'M', 'Q', 'N', 'O'],
    'FE': 2352.9,
    'p-value': 1.0665326826277723e-33
    }