igvteam / hic-straw

Command line and web utilities for reading .hic contact matrix files
MIT License
8 stars 4 forks source link

use chromosome list to handle chromosome name match #3

Closed lidaof closed 5 years ago

lidaof commented 5 years ago

related to #2, removed the usage of chrAlias, directly use chromosome list for name search with or w/o 'chr', npm test all passed.

jrobinso commented 5 years ago

hmm, I'm not sure this logic is correct. could you explain ?

lidaof commented 5 years ago

Hi Jim,

yeah, it's a two iteration of chromosome name search against this.hicFile.chromsomes, first search use the input chrom name as is, 2nd time removes chr character, and changed chrM to MT. It may not better than the chrAlias approach, but somehow this way it works in our code :)

jrobinso commented 5 years ago

@lidaof Thanks for the explanation, I'll look into it. The idea of the table is to provide a option to load your own in the future, IGV has many alias tables, 1<->chr1 is just one case. Some assemblies have roman numerals, some spell out "chromosome" while others don't, some come with acession numbers, etc. None of this is supported yet in the hic code but I might port it.

lidaof commented 5 years ago

sure, thank you @jrobinso.

jrobinso commented 5 years ago

@lidaof Could you pull from master and try again? Thanks.

lidaof commented 5 years ago

@jrobinso, yea, the new commit works nicely.

jrobinso commented 5 years ago

OK, I'll close this then.