Methods For Comparative Genome Analysis With Applications To Pan-Genomics And Genome Annotation