cljam.util.chromosome
Utilities for handling chromosome name.
chromosome-order-key
(chromosome-order-key s)
Converts a chromosome name into a comparable key.
In autosomes (chr1, chr2, ...), they are ordered by their numerical
designations, followed by chrX, chrY, chrM, and chrMT.
If two chromosome name prefixes are identical, they are sorted
in lexicographical order of the succeeding strings.
is-primary-chromosome?
(is-primary-chromosome? s)
Returns `true` if `s` is a primary chromosome name (chr1-chr22, chrX,
chrY, chrM, and chrMT), otherwise returns `false`.
normalize-chromosome-key
(normalize-chromosome-key s)
Normalizes chromosome name.
normalize-name
(normalize-name s)
Converts characters ',' or '.' in chromosome name to '_'
and erases ' and ".
trim-chromosome-key
(trim-chromosome-key s)
Removes chr prefix from chromosome name.