A novel method for automatic and reliable functional annotation of proteins