Remote Homology Detection In Proteins Using Graphical Models