BioJulia / GenomicFeatures.jl

Tools for genomic features in Julia.
Other
32 stars 13 forks source link

custom ordering of chromosomes #45

Open rulixxx opened 2 years ago

rulixxx commented 2 years ago

Hello, having a custom ordering of chromosomes seems to be quite painful at the moment. I've had to overwrite/extend many of the methods from GenomicFeatures and Indexes as they have Base.isless hardcoded into them. This is quite critical for us since we like to work with bioinformatic order instead of lexicographic ordering. We are generating quite large files and just going back to reorder at the end of our analyses would be very painful.

It would be nice to have just one definition of the chromosome order, perhaps in BioGeneric that would get picked up in other modules.

CiaranOMara commented 2 years ago

Instead of simply using isless we should refactor to use Base.Order.lt and Ordering (see https://docs.julialang.org/en/v1/base/sort/#Alternate-orderings).