python/pymethylprocess/MethylationDataTypes.py
def split_by_subtype(self, disease_only, subtype_delimiter):
        """Split MethylationArray into generator of MethylationArrays by phenotype column. Much akin to groupby. Only splits from disease column.

        Parameters
        ----------
        disease_only
            Consider disease superclass.
        subtype_delimiter
            How to break up disease column if using disease_only.
        """
        for disease, pheno_df in self.pheno.groupby(self.split_key('disease',subtype_delimiter) if disease_only else 'disease'):
            new_disease_name = disease.replace(' ','')
            beta_df = self.beta.loc[pheno_df.index,:]
            yield MethylationArray(pheno_df,beta_df,new_disease_name)
Split MethylationArray into generator of MethylationArrays by phenotype column. Much akin to groupby. Only splits from disease column.

        Parameters
        ----------
        disease_only
            Consider disease superclass.
        subtype_delimiter
            How to break up disease column if using disease_only.
        
Split MethylationArray into generator of MethylationArrays by phenotype column. Much akin to groupby. Only splits from disease column.
Parameters

disease_only
Consider disease superclass.
subtype_delimiter
How to break up disease column if using disease_only.
Split MethylationArray into generator of MethylationArrays by phenotype column . Much akin to groupby . Only splits from disease column . Parameters disease_only Consider disease superclass . subtype_delimiter How to break up disease column if using disease_only .
def split_by_subtype(self, disease_only, subtype_delimiter):
        for disease, pheno_df in self.pheno.groupby(self.split_key('disease',subtype_delimiter) if disease_only else 'disease'):
            new_disease_name = disease.replace(' ','')
            beta_df = self.beta.loc[pheno_df.index,:]
            yield MethylationArray(pheno_df,beta_df,new_disease_name)
def split_by_subtype ( self , disease_only , subtype_delimiter ) : for disease , pheno_df in self . pheno . groupby ( self . split_key ( 'disease' , subtype_delimiter ) if disease_only else 'disease' ) : new_disease_name = disease . replace ( ' ' , '' ) beta_df = self . beta . loc [ pheno_df . index , : ] yield MethylationArray ( pheno_df , beta_df , new_disease_name )
Split MethylationArray into generator of MethylationArrays by phenotype column.
Split MethylationArray into generator of MethylationArrays by phenotype column .
"""Split MethylationArray into generator of MethylationArrays by phenotype column. Much akin to groupby. Only splits from disease column.

        Parameters
        ----------
        disease_only
            Consider disease superclass.
        subtype_delimiter
            How to break up disease column if using disease_only.
        """
self
disease_only
subtype_delimiter