JetBrains-Research / jbr

JBR Genome Browser
https://doi.org/10.1093/bioinformatics/btab376
11 stars 0 forks source link

Support BAM files created using GRCh* chromosomes names #198

Closed iromeo closed 1 year ago

iromeo commented 1 year ago

The difference between UCSC and GRCh* notation is in lack of chr prefix name, slightly different mitochondrial chromosome name. E.g. 2 instead of chr2, Y instead of chrY, MT instead of chrMT. In JBR API Genome. chromosomeNamesMap provides a mapping from alternative names into Chromosome object, and Chromosome.name will always return UCSC like name. So we need some additional convertion/mapping layer when accessing to BAM chromsomes names using just model.chromosome.name.

Affects CRAM/BAM/SAM support.

P.S: Do not hardcode chr removal manually, or chrM -> MT mapping. It is also stored in Genome info that is loaded from annotations descriptor.

iromeo commented 1 year ago

Support for CRCh* names added in https://github.com/JetBrains-Research/epigenome/commit/65fe21854071a6c7f3f733f7fdf8f7eb5264e856

iromeo commented 1 year ago

Please add tests for the feature, that conversion works and error message is shown