def get_modifications(self):
        """Extract INDRA Modification Statements from BEL.

        Two SPARQL patterns are used for extracting Modifications from BEL:

        - q_phospho1 assumes that the subject is an AbundanceActivity, which
          increases/decreases a ModifiedProteinAbundance.

          Examples:

              kinaseActivity(proteinAbundance(HGNC:IKBKE))
              directlyIncreases
              proteinAbundance(HGNC:IRF3,proteinModification(P,S,385))

              phosphataseActivity(proteinAbundance(HGNC:DUSP4))
              directlyDecreases
              proteinAbundance(HGNC:MAPK1,proteinModification(P,T,185))

        - q_phospho2 assumes that the subject is a ProteinAbundance which
          increases/decreases a ModifiedProteinAbundance.

          Examples:

              proteinAbundance(HGNC:NGF) increases
              proteinAbundance(HGNC:NFKBIA,proteinModification(P,Y,42))

              proteinAbundance(HGNC:FGF1) decreases
              proteinAbundance(HGNC:RB1,proteinModification(P))
        """

        # Get statements where the subject is an activity
        q_phospho1 = prefixes + """
            SELECT ?enzName ?substrateName ?mod ?pos
                   ?stmt ?enzyme ?substrate ?rel
            WHERE {
                ?stmt a belvoc:Statement .
                ?stmt belvoc:hasRelationship ?rel .
                ?stmt belvoc:hasSubject ?subject .
                ?stmt belvoc:hasObject ?object .
                ?subject a belvoc:AbundanceActivity .
                ?subject belvoc:hasChild ?enzyme .
                ?enzyme a belvoc:ProteinAbundance .
                ?enzyme belvoc:hasConcept ?enzName .
                ?object a belvoc:ModifiedProteinAbundance .
                ?object belvoc:hasModificationType ?mod .
                ?object belvoc:hasChild ?substrate .
                ?substrate belvoc:hasConcept ?substrateName .
                OPTIONAL { ?object belvoc:hasModificationPosition ?pos . }
            }
        """
        # Get statements where the subject is a protein abundance
        q_phospho2 = prefixes + """
            SELECT ?enzName ?substrateName ?mod ?pos
                   ?stmt ?enzyme ?substrate ?rel
            WHERE {
                ?stmt a belvoc:Statement .
                ?stmt belvoc:hasRelationship ?rel .
                ?stmt belvoc:hasSubject ?enzyme .
                ?stmt belvoc:hasObject ?object .
                ?enzyme a belvoc:ProteinAbundance .
                ?enzyme belvoc:hasConcept ?enzName .
                ?object a belvoc:ModifiedProteinAbundance .
                ?object belvoc:hasModificationType ?mod .
                ?object belvoc:hasChild ?substrate .
                ?substrate belvoc:hasConcept ?substrateName .
                OPTIONAL { ?object belvoc:hasModificationPosition ?pos . }
            }
        """
        for q_phospho in (q_phospho1, q_phospho2):
            # Run the query
            res_phospho = self.g.query(q_phospho)

            for stmt in res_phospho:
                # Parse out the elements of the query
                evidence = self._get_evidence(stmt[4])
                enz = self._get_agent(stmt[0], stmt[5])
                #act_type = name_from_uri(stmt[1])
                sub = self._get_agent(stmt[1], stmt[6])
                mod = term_from_uri(stmt[2])
                residue = self._get_residue(mod)
                mod_pos = term_from_uri(stmt[3])
                stmt_str = strip_statement(stmt[4])
                # Get the relationship (increases/decreases, etc.)
                rel = term_from_uri(stmt[7])
                if rel == 'DirectlyIncreases' or rel == 'DirectlyDecreases':
                    is_direct = True
                else:
                    is_direct = False

                # Build the INDRA statement
                # Handle PhosphorylationSerine, etc.
                if mod.startswith('Phosphorylation'):
                    modtype = 'phosphorylation'
                else:
                    modtype = mod.lower()
                # Get the class and invert if needed
                modclass = modtype_to_modclass[modtype]
                if rel == 'DirectlyDecreases' or rel == 'Decreases':
                    modclass = modclass_to_inverse[modclass]
                stmt = modclass(enz, sub, residue, mod_pos, evidence)
                if is_direct:
                    self.statements.append(stmt)
                    self.converted_direct_stmts.append(stmt_str)
                else:
                    self.converted_indirect_stmts.append(stmt_str)
                    self.indirect_stmts.append(stmt)
        return
Extract INDRA Modification Statements from BEL.

        Two SPARQL patterns are used for extracting Modifications from BEL:

        - q_phospho1 assumes that the subject is an AbundanceActivity, which
          increases/decreases a ModifiedProteinAbundance.

          Examples:

              kinaseActivity(proteinAbundance(HGNC:IKBKE))
              directlyIncreases
              proteinAbundance(HGNC:IRF3,proteinModification(P,S,385))

              phosphataseActivity(proteinAbundance(HGNC:DUSP4))
              directlyDecreases
              proteinAbundance(HGNC:MAPK1,proteinModification(P,T,185))

        - q_phospho2 assumes that the subject is a ProteinAbundance which
          increases/decreases a ModifiedProteinAbundance.

          Examples:

              proteinAbundance(HGNC:NGF) increases
              proteinAbundance(HGNC:NFKBIA,proteinModification(P,Y,42))

              proteinAbundance(HGNC:FGF1) decreases
              proteinAbundance(HGNC:RB1,proteinModification(P))