def limma(dataset, group_A, group_B): # Get design processed_data = make_design_matrix(dataset['rawdata'], group_A, group_B) # Add return pandas2ri.ri2py(r.limma(pandas2ri.py2ri(processed_data['expression']), pandas2ri.py2ri(processed_data['design']))).sort_values('logFC', ascending=False).set_index('gene_symbol')
def limma(dataset, group_A, group_B, data='subset', sort_by='t', filter_genes=True): # Get design processed_data = make_design_matrix(dataset['rawdata'].copy(), group_A, group_B, data) # Add return pandas2ri.ri2py(r.limma(pandas2ri.py2ri(processed_data['expression']), pandas2ri.py2ri(processed_data['design']), filter_genes)).sort_values(sort_by, ascending=False).set_index('gene_symbol')