graph structure recognition for  indel case