Skip to content

Properly sort chromosomes in output file #50

@wdecoster

Description

@wdecoster

Sorting the output file should be done by chromosome and then by position. However, sorting by chromosome is hard: you don't want chr10 before chr7, chromosomes may or may not have chr prefix. Removing the 'chr' and converting to int is a problem for chrX, chrY, chrMT, and all decoy contigs/alternative haplotypes.

I naively tried key=lambda col: col.astype(str).str.replace('chr', '').astype(int)) but it has to be more advanced.

Alternatively, we could use bcftools... but adding more dependencies if something I would like to avoid. Then again I already added pandas for combining the files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions