scout/adapter/mongo/variant.py
def verified(self, institute_id):
        """Return all verified variants for a given institute

        Args:
            institute_id(str): institute id

        Returns:
            res(list): a list with validated variants
        """
        query = {
            'verb' : 'validate',
            'institute' : institute_id,
        }
        res = []
        validate_events = self.event_collection.find(query)
        for validated in list(validate_events):
            case_id = validated['case']
            var_obj = self.variant(case_id=case_id, document_id=validated['variant_id'])
            case_obj = self.case(case_id=case_id)
            if not case_obj or not var_obj:
                continue # Take into account that stuff might have been removed from database
            var_obj['case_obj'] = {
                'display_name' : case_obj['display_name'],
                'individuals' : case_obj['individuals']
            }
            res.append(var_obj)

        return res
def verified(self, institute_id):
        """Return all verified variants for a given institute

        Args:
            institute_id(str): institute id

        Returns:
            res(list): a list with validated variants
        """
        query = {
            'verb' : 'validate',
            'institute' : institute_id,
        }
        res = []
        validate_events = self.event_collection.find(query)
        for validated in list(validate_events):
            case_id = validated['case']
            var_obj = self.variant(case_id=case_id, document_id=validated['variant_id'])
            case_obj = self.case(case_id=case_id)
            if not case_obj or not var_obj:
                continue # Take into account that stuff might have been removed from database
            var_obj['case_obj'] = {
                'display_name' : case_obj['display_name'],
                'individuals' : case_obj['individuals']
            }
            res.append(var_obj)

        return res
Return all verified variants for a given institute

        Args:
            institute_id(str): institute id

        Returns:
            res(list): a list with validated variants