def anova_one_drug_one_feature(anova, options): """Analyse the entire data set""" from gdsctools import anova_report if options.tissue is not None: anova.set_cancer_type(options.tissue) odof = anova_report.Association(anova, drug=options.drug, feature=options.feature) #print(odof.settings) # for the HTML #odof.add_dependencies = True #odof.add_settings = True df = odof.run() if df.ix[1]['FEATURE_IC50_effect_size'] is None: msg = "association %s vs %s not valid for testing (not enough" +\ " MSI or positives for that features ? Try with "+\ " --exclude-msi (you must then set a tissue with "+\ " --tissue" print(red(msg % (options.drug, options.feature))) else: print(df.T) # HTML report if options.no_html is True: return odof.create_report(onweb=options.onweb)
def anova_one_drug(anova, options): """Analyse one specific drug""" from gdsctools import ANOVAReport anova.set_cancer_type(options.tissue) if options.feature: anova.feature_names = options.features results = anova.anova_one_drug(options.drug) print("\nFound %s associations" % len(results)) if len(results)==0: print(red("\nPlease try with another drug or no --drug option")) return # ?? is this required ? N = len(results) results.df.insert(0, 'ASSOC_ID', range(1, N+1)) if options.no_html is True: return r = ANOVAReport(anova, results=results) print(darkgreen("\nCreating all figure and html documents in %s" % r.settings.directory)) r.create_html_pages(onweb=options.onweb)
def anova_one_drug(anova, options): """Analyse one specific drug""" from gdsctools import ANOVAReport anova.set_cancer_type(options.tissue) if options.feature: anova.feature_names = options.features results = anova.anova_one_drug(options.drug) print("\nFound %s associations" % len(results)) if len(results) == 0: print(red("\nPlease try with another drug or no --drug option")) return # ?? is this required ? N = len(results) results.df.insert(0, 'ASSOC_ID', range(1, N + 1)) if options.no_html is True: return r = ANOVAReport(anova, results=results) print( darkgreen("\nCreating all figure and html documents in %s" % r.settings.directory)) r.create_html_pages(onweb=options.onweb)
def anova_one_drug_one_feature(anova, options): """Analyse the entire data set""" from gdsctools import anova_report from gdsctools.report import ReportMain if options.tissue is not None: anova.set_cancer_type(options.tissue) # just to create the directory ReportMain(directory=options.directory) odof = anova_report.Association(anova, drug=int(options.drug), feature=options.feature) odof.add_href = False df = odof.run() if df.loc[1]['FEATURE_IC50_effect_size'] is None: msg = "association %s vs %s not valid for testing (not enough" +\ " MSI or positives for that features ? Try with "+\ " --exclude-msi (you must then set a tissue with "+\ " --tissue" print(red(msg % (options.drug, options.feature))) else: print(df.T) # HTML report if options.no_html is True: return odof.create_report(onweb=options.onweb)