Sort_ranges should offer more functionality, in particular the possibility of sorting by other fields before/after any loc columns. Currently a bit tricky (and not comprehensive), with wise subsequent calls to sort_values(by, type='stable').
See #92 (comment)
Suggested interface:
by : str or list of str, default None
If provided, sorting occurs by Chromosome, Strand (if present), *by, Start, and End.
To prioritize columns differently (e.g. Strand before Chromosome), explicitly provide all columns
in the desired order as part of the 'by' argument.
(...)
sort_descending : str or list of str, default None
A column name or list of column names to sort in descending order, instead of ascending.
These may include column names in the 'by' argument, or those implicitly included (e.g. Chromosome).
Sort_ranges should offer more functionality, in particular the possibility of sorting by other fields before/after any loc columns. Currently a bit tricky (and not comprehensive), with wise subsequent calls to sort_values(by, type='stable').
See #92 (comment)
Suggested interface:
by : str or list of str, default None
If provided, sorting occurs by Chromosome, Strand (if present), *by, Start, and End.
To prioritize columns differently (e.g. Strand before Chromosome), explicitly provide all columns
in the desired order as part of the 'by' argument.
(...)
sort_descending : str or list of str, default None
A column name or list of column names to sort in descending order, instead of ascending.
These may include column names in the 'by' argument, or those implicitly included (e.g. Chromosome).