Skip to content

Sort ranges: more versatile #94

@marco-mariotti

Description

@marco-mariotti

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions