-
Notifications
You must be signed in to change notification settings - Fork 1
/
set_functions.py
42 lines (31 loc) · 1.68 KB
/
set_functions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def kFrameUnion(input):
"""
Calculate the union of the kDataFrames. The result kDataframe will have all the kmers in the input list of kDataframes.
The count of the kmers equals to the sum of the kmer count in the input list.
.. warning:: This function works only with :class:`kProcessor.kDataFrameMQF`.
:param input: List of kDataFrames
:type input: list of :class:`kProcessor.kDataFrameMQF`
:return: New kDataFrame object holding the union of kmers in the kDataFrames list.
:rtype: :class:`kProcessor.kDataFrame`
"""
def kFrameIntersect(input):
"""
Calculate the intersect of the kDataFrames. The result kDataframe will have only kmers that exists in all the kDataframes.
The count of the kmers equals to the minimum of the kmer count in the input list.
.. warning:: This function works only with :class:`kProcessor.kDataFrameMQF`.
:param input: List of kDataFrames
:type input: list of :class:`kProcessor.kDataFrameMQF`
:return: New kDataFrame object holding the intersection of kmers in the kDataFrames list.
:rtype: :class:`kDataFrame`
"""
def kFrameDiff(input):
"""
Calculate the difference of the kDataframes.
The result kDataframe will have only kmers that exists in the first kDataframe and not in any of the rest input kDataframes.
The count of the kmers equals to the count in the first kDataframe.
.. warning:: This function works only with :class:`kProcessor.kDataFrameMQF`.
:param input: List of kDataFrames
:type input: list of :class:`kProcessor.kDataFrameMQF`
:return: New kDataFrame object holding the difference of kmers in the kDataFrames list.
:rtype: :class:`kDataFrame`
"""