superexacttestpy.tl.inc_intersect

superexacttestpy.tl.inc_intersect(x, degree)

Calculate the number of intersections for a given degree for all barcodes

Parameters:
x : list

List of sets

degree : int

Degree of the intersection (number of sets in the intersection)

Returns:

A dataframe with each column is a barcode and the row is the number of intersections for this barcode

Return type:

pd.DataFrame

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"]]
>>> inc_intersect(data, 2)
...    |    |   011 |   101 |   110 |
...    |---:|------:|------:|------:|
...    |  0 |     6 |    10 |     6 |