skbio.metadata.IntervalMetadata.sort#
- IntervalMetadata.sort(ascending=True)[source]#
Sort interval features by their coordinates.
It sorts by the start coordinate first. If they are the same between two interval features, they will be sorted by comparing their end coordinates. For example, an interval feature with [(1, 2), (4, 7)] will be sorted in front of another one with [(1, 2), (3, 8)].
- Parameters:
- ascendingbool, optional
sort in ascending or descending coordinates.