BimberLab / nimble

nimble — execute lightweight, flexible alignments on arbitrary reference libraries
MIT License
1 stars 0 forks source link

Sort mult-ref allele hits so the string is deterministic #52

Closed bbimber closed 2 years ago

bbimber commented 2 years ago

When reporting multi-ref hits, nimble collapses them into a CSV string, like:

NKG2A,NGK2C

then problem is that order is random, so we can have two separate hits reported, like this:

NKG2A,NGK2C NKG2C,NGK2A

I propose nimble always sorts the names in a multi-ref hit before joining on comma. This makes a deterministic name. If whatever code does this operation can easily do a natural sort we should, since often the names have numbers, like: KIR3DL2,KIR3DL10, and the output would be a more human intuitive result.