Clone of Heng Li's hcluster_sg