-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenomicSegmentSet.py
51 lines (37 loc) · 1.62 KB
/
GenomicSegmentSet.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
43
44
45
46
47
48
import cgDataV2.Exceptions
from cgDataV2.GenomicSegmentMetadata import GenomicSegmentMetadata
from cgDataV2.GenomicSegmentVector import GenomicSegmentVector
class GenomicSegmentSet(object):
"""This class represents a collection of GenomicSegment objects, such
as a file with GenomicSegment observations.
Note that while the API documentation uses the term GenomicSegment
to refer to the individual segments and a collection of segments, this
class contains a collection of segments. The individual segments are
represented by the GenomicSegment class.
Question: Would a sort method be useful?
See also: GenomicSegmentVector
"""
def __init__(self, genomicSegmentMetadata):
"""Given a genomic segment set metadata object, load the
corresponding GenomicSegmentSet object. The new object is
validated. If validation fails, a ValidationFailed exception
is thrown.
"""
pass
def __validate(self):
"""Validate this GenomicSegmentSet. If unsuccessful, throw
a ValidationFailed exception.
"""
pass
def nSamples(self):
"""Return the number of samples in this GenomicMatrix"""
pass
def sampleList(self):
"""Return the list of samples represented in this GenonicSegmentSet"""
pass
def sort(self, cmp=GenomicSegmentVector.genomicSegmentVectorCompare):
"""Sort the genomic segments according to the indicated compare function"""
pass
def write(self, filename):
"""Write the GenomicSegmentSet object to the indicated filename"""
pass