Distinct diseases (``name`` in :class:`.models.Disease`)

        :returns: all distinct disease names
        :rtype: list[str]
490981
def diseases(self):
        
        return [x[0] for x in self.session.query(models.Disease.name).all()]
524893
def gene_counts(self):
        
        return {
            gene_name: len(group)
            for (gene_name, group)
            in self.groupby_gene_name().items()
        }
623084
def distinct(xs):
    """"""
    # don't use collections.OrderedDict because we do support Python 2.6
    seen = set()
    return [x for x in xs if x not in seen and not seen.add(x)]
3712
def conditions(self) -> Dict[str, Dict[str, Union[float, numpy.ndarray]]]:
        
        conditions = {}
        for subname in NAMES_CONDITIONSEQUENCES:
            subseqs = getattr(self, subname, ())
            subconditions = {seq.name: copy.deepcopy(seq.values)
                             for seq in subseqs}
            if subconditions:
                conditions[subname] = subconditions
        return conditions
412158
def select_distinct(distinct_field=None, **kwargs):
    
    results = search_associations(rows=0,
                                  select_fields=[],
                                  facet_field_limits = {
                                      distinct_field : -1
                                  },
                                  facet_fields=[distinct_field],
                                  **kwargs
    )
    # TODO: map field
    return list(results['facet_counts'][distinct_field].keys())
1366429
def _unique(list_of_dicts):
    '''
    
    '''
    unique_list = []
    for ele in list_of_dicts:
        if ele not in unique_list:
            unique_list.append(ele)
    return unique_list
426104
def distinct_words(string_matrix: List[List[str]]) -> Set[str]:
    
    return set([word
                for sentence in string_matrix
                for word in sentence])
1152135
def genes_with_a_representative_sequence(self):
        """"""
        return DictList(x for x in self.genes if x.protein.representative_sequence)
1367977
def get_disease_comments(self, entry):
        
        disease_comments = []
        query = "./comment[@type='disease']"

        for disease_comment in entry.iterfind(query):
            value_dict = {'comment': disease_comment.find('./text').text}

            disease = disease_comment.find("./disease")

            if disease is not None:
                disease_dict = {'identifier': disease.get('id')}

                for element in disease:
                    key = element.tag

                    if key in ['acronym', 'description', 'name']:
                        disease_dict[key] = element.text

                    if key == 'dbReference':
                        disease_dict['ref_id'] = element.get('id')
                        disease_dict['ref_type'] = element.get('type')

                disease_obj = models.get_or_create(self.session, models.Disease, **disease_dict)
                self.session.add(disease_obj)
                self.session.flush()
                value_dict['disease_id'] = disease_obj.id

            disease_comments.append(models.DiseaseComment(**value_dict))

        return disease_comments
1061925
def gene_forms(self):
        
        q = self.session.query(distinct(models.ChemGeneIxnGeneForm.gene_form))
        return [x[0] for x in q.all()]
1009644
def level_names(self):
        
        index = self.to_index()
        if isinstance(index, pd.MultiIndex):
            return index.names
        else:
            return None
1356615
def names(self) -> [str]:
        
        return sorted([name for name in self.axes_by_sname.keys() if name is not ''])
1111322
def sys_names(self):
        
        names = {}
        for osys in self.overall_sys:
            names[osys.name] = None
        for hsys in self.histo_sys:
            names[hsys.name] = None
        return names.keys()
582657
def get_all_names( self, offset=None, count=None, include_expired=False ):
        
        if offset is not None and offset < 0:
            offset = None

        if count is not None and count < 0:
            count = None 

        cur = self.db.cursor()
        names = namedb_get_all_names( cur, self.lastblock, offset=offset, count=count, include_expired=include_expired )
        return names
837108
def _computeUniqueReadCounts(self):
        
        for pathogenName, samples in self.pathogenNames.items():
            for sampleName in samples:
                self.pathogenSampleFiles.add(pathogenName, sampleName)
732093
def distinct(self, field=None):
        
        if field is None:
            self.funcs.append(('distinct', (), {}))
        else:
            self.distinct_field = field
        return self
962991
def unique_(self, col):
        
        try:
            df = self.df.drop_duplicates(subset=[col], inplace=False)
            return list(df[col])
        except Exception as e:
            self.err(e, "Can not select unique data")