Protein family classification and functional annotation