A novel domain-based method for predicting the functional classes of proteins