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_all(anova, options):
    """Analyse the entire data set. May be restricted to one feature"""
    from gdsctools import ANOVAReport
    if options.feature:
        anova.feature_names = [options.feature]

    # The analysis
    print(darkgreen("Starting the analysis"))
    df = anova.anova_all()
    if len(df) == 0:
        print("Found no valid association ? Check your input files")
        return
    # HTML report
    if options.no_html is True:
        return

    r = ANOVAReport(anova, results=df)
    print(darkgreen("Creating all figure and html documents in %s" %
            r.settings.directory))
    r.create_html_pages(onweb=options.onweb)
Exemple #4
0
def anova_all(anova, options):
    """Analyse the entire data set. May be restricted to one feature"""
    from gdsctools import ANOVAReport
    if options.feature:
        anova.feature_names = [options.feature]

    # The analysis
    print(darkgreen("Starting the analysis"))
    df = anova.anova_all()
    if len(df) == 0:
        print("Found no valid association ? Check your input files")
        return
    # HTML report
    if options.no_html is True:
        return

    r = ANOVAReport(anova, results=df)
    print(darkgreen("Creating all figure and html documents in %s" %
            r.settings.directory))
    r.create_html_pages(onweb=options.onweb)