python/pymethylprocess/PreProcessDataTypes.py
def output_pheno_beta(self, meffil=False):
        """Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object.

        Parameters
        ----------
        meffil
            True if ran meffil pipeline."""
        self.pheno_py=pandas2ri.ri2py(robjects.r['as'](self.pheno,'data.frame'))
        if not meffil:
            self.beta_py=pd.DataFrame(pandas2ri.ri2py(self.beta_final),index=numpy2ri.ri2py(robjects.r("featureNames")(self.RSet)),columns=numpy2ri.ri2py(robjects.r("sampleNames")(self.RSet))).transpose()
            self.pheno_py['Sample_Name']=np.vectorize(lambda x: x.split('/')[-1])(self.pheno_py['Basename'])
            self.pheno_py = self.pheno_py.set_index('Sample_Name').loc[self.beta_py.index,:]
        else:
            self.beta_py=pd.DataFrame(pandas2ri.ri2py(self.beta_final),index=robjects.r("rownames")(self.beta_final),columns=robjects.r("colnames")(self.beta_final)).transpose()
            print(self.beta_py)
            print(self.beta_py.index)
            print(self.pheno_py)
            self.pheno_py = self.pheno_py.set_index('Sample_Name').loc[self.beta_py.index,:]
Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object.

        Parameters
        ----------
        meffil
            True if ran meffil pipeline.
Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object.
Parameters

meffil
True if ran meffil pipeline.
Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object . Parameters meffil True if ran meffil pipeline .
def output_pheno_beta(self, meffil=False):
        self.pheno_py=pandas2ri.ri2py(robjects.r['as'](self.pheno,'data.frame'))
        if not meffil:
            self.beta_py=pd.DataFrame(pandas2ri.ri2py(self.beta_final),index=numpy2ri.ri2py(robjects.r("featureNames")(self.RSet)),columns=numpy2ri.ri2py(robjects.r("sampleNames")(self.RSet))).transpose()
            self.pheno_py['Sample_Name']=np.vectorize(lambda x: x.split('/')[-1])(self.pheno_py['Basename'])
            self.pheno_py = self.pheno_py.set_index('Sample_Name').loc[self.beta_py.index,:]
        else:
            self.beta_py=pd.DataFrame(pandas2ri.ri2py(self.beta_final),index=robjects.r("rownames")(self.beta_final),columns=robjects.r("colnames")(self.beta_final)).transpose()
            print(self.beta_py)
            print(self.beta_py.index)
            print(self.pheno_py)
            self.pheno_py = self.pheno_py.set_index('Sample_Name').loc[self.beta_py.index,:]
def output_pheno_beta ( self , meffil = False ) : self . pheno_py = pandas2ri . ri2py ( robjects . r [ 'as' ] ( self . pheno , 'data.frame' ) ) if not meffil : self . beta_py = pd . DataFrame ( pandas2ri . ri2py ( self . beta_final ) , index = numpy2ri . ri2py ( robjects . r ( "featureNames" ) ( self . RSet ) ) , columns = numpy2ri . ri2py ( robjects . r ( "sampleNames" ) ( self . RSet ) ) ) . transpose ( ) self . pheno_py [ 'Sample_Name' ] = np . vectorize ( lambda x : x . split ( '/' ) [ - 1 ] ) ( self . pheno_py [ 'Basename' ] ) self . pheno_py = self . pheno_py . set_index ( 'Sample_Name' ) . loc [ self . beta_py . index , : ] else : self . beta_py = pd . DataFrame ( pandas2ri . ri2py ( self . beta_final ) , index = robjects . r ( "rownames" ) ( self . beta_final ) , columns = robjects . r ( "colnames" ) ( self . beta_final ) ) . transpose ( ) print ( self . beta_py ) print ( self . beta_py . index ) print ( self . pheno_py ) self . pheno_py = self . pheno_py . set_index ( 'Sample_Name' ) . loc [ self . beta_py . index , : ]
Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object.
Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object .
"""Get pheno and beta dataframe objects stored as attributes for input to MethylationArray object.

        Parameters
        ----------
        meffil
            True if ran meffil pipeline."""
self
meffil