python/methylnet/interpretation_classes.py
def view_methylation(self, individual, methyl_arr):
        """Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame.

        Parameters
        ----------
        individual : type
            Individual to query from ShapleyData
        methyl_arr : type
            Input MethylationArray

        Returns
        -------
        class_name
        individual
        top_shap_df
            Top Shapley DataFrame with top cpgs for individual, methylation data appended.

        """

        class_name,top_shap_df=self.extract_individual(individual)
        #print(top_shap_df['cpg'].values,len(top_shap_df['cpg'].values))
        top_shap_df['methylation']=methyl_arr.beta.loc[individual,top_shap_df['cpg'].values].values
        return class_name,individual,top_shap_df
Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame.

        Parameters
        ----------
        individual : type
            Individual to query from ShapleyData
        methyl_arr : type
            Input MethylationArray

        Returns
        -------
        class_name
        individual
        top_shap_df
            Top Shapley DataFrame with top cpgs for individual, methylation data appended.

        
Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame.
Parameters

individual : type
Individual to query from ShapleyData
methyl_arr : type
Input MethylationArray

Returns

class_name
individual
top_shap_df
Top Shapley DataFrame with top cpgs for individual, methylation data appended.
Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame . Parameters individual : type Individual to query from ShapleyData methyl_arr : type Input MethylationArray Returns class_name individual top_shap_df Top Shapley DataFrame with top cpgs for individual methylation data appended .
def view_methylation(self, individual, methyl_arr):
        class_name,top_shap_df=self.extract_individual(individual)
        top_shap_df['methylation']=methyl_arr.beta.loc[individual,top_shap_df['cpg'].values].values
        return class_name,individual,top_shap_df
def view_methylation ( self , individual , methyl_arr ) : class_name , top_shap_df = self . extract_individual ( individual ) top_shap_df [ 'methylation' ] = methyl_arr . beta . loc [ individual , top_shap_df [ 'cpg' ] . values ] . values return class_name , individual , top_shap_df
Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame.
Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame .
"""Use MethylationArray to output top SHAP values for individual with methylation data appended to output data frame.

        Parameters
        ----------
        individual : type
            Individual to query from ShapleyData
        methyl_arr : type
            Input MethylationArray

        Returns
        -------
        class_name
        individual
        top_shap_df
            Top Shapley DataFrame with top cpgs for individual, methylation data appended.

        """ #print(top_shap_df['cpg'].values,len(top_shap_df['cpg'].values))
self
individual
methyl_arr