Complete assembly of circular and chloroplast genomes based on global optimization