python/pymethylprocess/PreProcessDataTypes.py
def remove_diseases(self,exclude_disease_list, low_count, disease_only,subtype_delimiter):
        """Remove samples with certain diseases from disease column.

        Parameters
        ----------
        exclude_disease_list
            List containing diseases to remove.
        low_count
            Remove samples that have less than x disease occurances in column.
        disease_only
            Whether to split phenotype column entries by delimiter.
        subtype_delimiter
            Subtype delimiter to split on.
        """
        if low_count:
            low_count = int(low_count)
            cat_dist = self.get_categorical_distribution('disease', disease_only,subtype_delimiter).items()
            count_diseases=pd.DataFrame(list(cat_dist),columns=['disease','count'])
            count_diseases.loc[:,'count'] = count_diseases.loc[:,'count'].astype(int)
            exclude_diseases_more=count_diseases.loc[count_diseases['count'].values<low_count,'disease']
            exclude_diseases_more=exclude_diseases_more.unique().tolist()
            if disease_only:
                exclude_diseases_more=self.pheno_sheet.loc[self.pheno_sheet['disease_only'].isin(exclude_diseases_more),'disease'].unique().tolist()
        else:
            exclude_diseases_more=[]
        self.pheno_sheet = self.pheno_sheet[~self.pheno_sheet['disease'].isin(exclude_disease_list+exclude_diseases_more)]
Remove samples with certain diseases from disease column.

        Parameters
        ----------
        exclude_disease_list
            List containing diseases to remove.
        low_count
            Remove samples that have less than x disease occurances in column.
        disease_only
            Whether to split phenotype column entries by delimiter.
        subtype_delimiter
            Subtype delimiter to split on.
        
Remove samples with certain diseases from disease column.
Parameters

exclude_disease_list
List containing diseases to remove.
low_count
Remove samples that have less than x disease occurances in column.
disease_only
Whether to split phenotype column entries by delimiter.
subtype_delimiter
Subtype delimiter to split on.
Remove samples with certain diseases from disease column . Parameters exclude_disease_list List containing diseases to remove . low_count Remove samples that have less than x disease occurances in column . disease_only Whether to split phenotype column entries by delimiter . subtype_delimiter Subtype delimiter to split on .
def remove_diseases(self,exclude_disease_list, low_count, disease_only,subtype_delimiter):
        if low_count:
            low_count = int(low_count)
            cat_dist = self.get_categorical_distribution('disease', disease_only,subtype_delimiter).items()
            count_diseases=pd.DataFrame(list(cat_dist),columns=['disease','count'])
            count_diseases.loc[:,'count'] = count_diseases.loc[:,'count'].astype(int)
            exclude_diseases_more=count_diseases.loc[count_diseases['count'].values<low_count,'disease']
            exclude_diseases_more=exclude_diseases_more.unique().tolist()
            if disease_only:
                exclude_diseases_more=self.pheno_sheet.loc[self.pheno_sheet['disease_only'].isin(exclude_diseases_more),'disease'].unique().tolist()
        else:
            exclude_diseases_more=[]
        self.pheno_sheet = self.pheno_sheet[~self.pheno_sheet['disease'].isin(exclude_disease_list+exclude_diseases_more)]
def remove_diseases ( self , exclude_disease_list , low_count , disease_only , subtype_delimiter ) : if low_count : low_count = int ( low_count ) cat_dist = self . get_categorical_distribution ( 'disease' , disease_only , subtype_delimiter ) . items ( ) count_diseases = pd . DataFrame ( list ( cat_dist ) , columns = [ 'disease' , 'count' ] ) count_diseases . loc [ : , 'count' ] = count_diseases . loc [ : , 'count' ] . astype ( int ) exclude_diseases_more = count_diseases . loc [ count_diseases [ 'count' ] . values < low_count , 'disease' ] exclude_diseases_more = exclude_diseases_more . unique ( ) . tolist ( ) if disease_only : exclude_diseases_more = self . pheno_sheet . loc [ self . pheno_sheet [ 'disease_only' ] . isin ( exclude_diseases_more ) , 'disease' ] . unique ( ) . tolist ( ) else : exclude_diseases_more = [ ] self . pheno_sheet = self . pheno_sheet [ ~ self . pheno_sheet [ 'disease' ] . isin ( exclude_disease_list + exclude_diseases_more ) ]
Remove samples with certain diseases from disease column.
Remove samples with certain diseases from disease column .
"""Remove samples with certain diseases from disease column.

        Parameters
        ----------
        exclude_disease_list
            List containing diseases to remove.
        low_count
            Remove samples that have less than x disease occurances in column.
        disease_only
            Whether to split phenotype column entries by delimiter.
        subtype_delimiter
            Subtype delimiter to split on.
        """
self
exclude_disease_list
low_count
disease_only
subtype_delimiter