def get_chrom(abs_pos, chr_info=None, c=None):
if chr_info is None:
try:
chr_info = get_chrom_names_cumul_len(c)
except:
return None
try:
chr_id = np.flatnonzero(chr_info[2] > abs_pos)[0] - 1
except IndexError:
return None
return chr_info[0][chr_id]
评论列表
文章目录