Family Of Hidden Markov Models And Its Applications To Phylogenetics And Metagenomics