scout/adapter/mongo/variant_loader.py
def update_compounds(self, variants):
        """Update the compounds for a set of variants.

        Args:
            variants(dict): A dictionary with _ids as keys and variant objs as values

        """
        LOG.debug("Updating compound objects")

        for var_id in variants:
            variant_obj = variants[var_id]
            if not variant_obj.get('compounds'):
                continue

            updated_compounds = self.update_variant_compounds(variant_obj, variants)
            variant_obj['compounds'] = updated_compounds

        LOG.debug("Compounds updated")

        return variants
def update_compounds(self, variants):
        """Update the compounds for a set of variants.

        Args:
            variants(dict): A dictionary with _ids as keys and variant objs as values

        """
        LOG.debug("Updating compound objects")

        for var_id in variants:
            variant_obj = variants[var_id]
            if not variant_obj.get('compounds'):
                continue

            updated_compounds = self.update_variant_compounds(variant_obj, variants)
            variant_obj['compounds'] = updated_compounds

        LOG.debug("Compounds updated")

        return variants
def update_compounds ( self , variants ) : LOG . debug ( "Updating compound objects" ) for var_id in variants : variant_obj = variants [ var_id ] if not variant_obj . get ( 'compounds' ) : continue updated_compounds = self . update_variant_compounds ( variant_obj , variants ) variant_obj [ 'compounds' ] = updated_compounds LOG . debug ( "Compounds updated" ) return variants
Update the compounds for a set of variants.

        Args:
            variants(dict): A dictionary with _ids as keys and variant objs as values
Update the compounds for a set of variants .