@classmethod
def from_terms(cls, terms, name, description, refgen):
    """
            Convenience function to create a Ontology from an iterable
            terms object. 

            Parameters
            ----------
            terms : iterable of camoco.GOTerm objects
                Items to add to the ontology. The key being the name
                of the term and the items being the loci.
            name : str
                The name of the camoco object to be stored in the database.
            description : str
                A short message describing the dataset.
            refgen : camoco.RefGen
                A RefGen object describing the genes in the dataset
        """
    self = cls.create(name, description, refgen)
    self.log('Adding {} terms to the database.', len(terms))
    self.add_terms(terms, overwrite=True)
    self.log('Building the indices.')
    self._build_indices()
    self.log('Your gene ontology is built.')
    return self
