tracts.tract
Classes
|
A tract is the lower-level object of interest. |
- class tracts.tract.Tract(start, end, label, bpstart=None, bpend=None)
Bases:
objectA tract is the lower-level object of interest. All the remaining structure is built on top of lists of tracts. In essence, a tract is simply a labelled interval.
- __init__(start, end, label, bpstart=None, bpend=None)
Constructor.
- Parameters:
start (float) – The starting point of this tract, in Morgans.
end (float)) – The ending point of this tract, in Morgans.
label (string) – A meaningful identifier for this tract. Generally this marks the ancestry associated with this tract.
bpstart (int, default: None) – The starting point of this tract, in basepairs. Since the rest of Tracts uses Morgans throughout, specifying this parameter is not necessary for Tracts to function correctly.
bpend (int, default: None) – The ending point of this tract, in basepairs.
- copy()
Constructs a new tract whose properties are the same as this one.
- get_label()
Gets the label of the tract.
- is_equal(other)
Check if two tracts are equal, in terms of their start, end, and label.
- len()
Gets the length of the tract (in Morgans)