get_annotation_pos function

Calculate positions of annotations for heatmap.