Get shared OTUIDs between all unique combinations of groups.

    :type groups: Dict
    :param groups: {Category name: OTUIDs in category}

    :return type: dict
    :return: Dict keyed on group combination and their shared OTUIDs as values.
558262
def shared_otuids(groups):
    
    for g in sorted(groups):
        print("Number of OTUs in {0}: {1}".format(g, len(groups[g].results["otuids"])))
    number_of_categories = len(groups)
    shared = defaultdict()
    for i in range(2, number_of_categories+1):
        for j in combinations(sorted(groups), i):
            combo_name = " & ".join(list(j))
            for grp in j:
                # initialize combo values
                shared[combo_name] = groups[j[0]].results["otuids"].copy()
                """iterate through all groups and keep updating combo OTUIDs with set
                intersection_update"""
                for grp in j[1:]:
                    shared[combo_name].intersection_update(groups[grp].results["otuids"])
    return shared
58918
def get_groups_data(self, groups):
        '''
        
        '''

        data = {}

        for group in groups:
            data.update(self.get_group_data(group))

        return data
951808
def _group(self, group_data):
        
        if isinstance(group_data, dict):
            # get xid from dict
            xid = group_data.get('xid')
        else:
            # get xid from object
            xid = group_data.xid

        if self.groups.get(xid) is not None:
            # return existing group from memory
            group_data = self.groups.get(xid)
        elif self.groups_shelf.get(xid) is not None:
            # return existing group from shelf
            group_data = self.groups_shelf.get(xid)
        else:
            # store new group
            self.groups[xid] = group_data
        return group_data
375067
def groups(self) -> Set[str]:
        
        return set(opt.group_name for opt in self._options.values())
1097775
def get_groups(self, roles):
        """"""
        ret = {}
        for role in roles:
            if role not in self.flatten:
                raise MissingRole(role)
            for b in self.flatten[role]['backends_groups']:
                if b not in ret:
                    ret[b] = []
                ret[b] = ret[b] + self.flatten[role]['backends_groups'][b]
        return ret
642517
def groups_data(self):
        
        return _ListProxy(GroupData(num, name, symbol, variant)
                          for (num, name, symbol, variant)
                          in zip(range(self.groups_count),
                                 self.groups_names,
                                 self.groups_symbols,
                                 self.groups_variants))
1272147
def _get_group_infos(self):
        
        if self._group_infos is None:
            self._group_infos = self._group_type.user_groups(
                self._ldap_user, self._group_search
            )

        return self._group_infos
1279254
def Group(self):
		

		return(clc.v2.Group(id=self.groupId,alias=self.alias,session=self.session))
746038
def get_unique_groups(input_list):
    """"""
    out_list = []
    for item in input_list:
        if item not in out_list:
            out_list.append(item)
    return out_list
702075
def Subgroups(self):
		

		return(Groups(alias=self.alias,groups_lst=self.data['groups'],session=self.session))
712150
def get_group(name):
    
    group = cache.get('bits.general.group_%s' % name)
    if not group:
        group = Group.objects.get(name=name)
        cache.set('bits.general.group_%s' % name, group, 365 * 24 * 60 * 60)
    return group
1262788
def select_groups(adata, groups='all', key='louvain'):
    
    strings_to_categoricals(adata)
    if isinstance(groups, list) and isinstance(groups[0], int): groups = [str(n) for n in groups]
    categories = adata.obs[key].cat.categories
    groups_masks = np.array([categories[i] == adata.obs[key].values for i, name in enumerate(categories)])
    if groups == 'all':
        groups = categories.values
    else:
        groups_ids = [np.where(categories.values == name)[0][0] for name in groups]
        groups_masks = groups_masks[groups_ids]
        groups = categories[groups_ids].values
    return groups, groups_masks
303719
def get_group(self, name, default=NoGroupError):
        '''
        
        '''

        if name in self.groups:
            return self.groups[name]

        if default is NoGroupError:
            raise NoGroupError('No such group: {0}'.format(name))

        return default
8817
def groups(self):
        

        # Split paths into components and take the first (group) component.
        object_paths = (
            path_components(path)
            for path in self.objects)
        group_names = (path[0] for path in object_paths if len(path) > 0)

        # Use an ordered dict as an ordered set to find unique
        # groups in order.
        groups_set = OrderedDict()
        for group in group_names:
            groups_set[group] = None
        return list(groups_set)
1184398
def list_groups(region=None, key=None, keyid=None, profile=None):
    '''
    

    '''
    return [a.name for a in get_all_groups(region=region, key=key, keyid=keyid, profile=profile)]
710907
def get_group(self, group_name):
        
        response = self.client.get_group(GroupName=group_name,
                                         UserPoolId=self.user_pool_id)
        return self.get_group_obj(response.get('Group'))
1335023
def get_group_details(group):
    
    result = []
    for datastore in _get_datastores():
        value = datastore.get_group_details(group)
        value['datastore'] = datastore.config['DESCRIPTION']
        result.append(value)
    return result