コード例 #1
0
ファイル: plot_data.py プロジェクト: KarchinLab/2020plus
def precision_recall_curve(df,
                           save_path,
                           style,
                           sem=None,
                           title='Precision-Recall Curve',
                           xlabel='Recall',
                           ylabel='Precision'):
    logger.info('Plotting precision-recall curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df,
                   save_path,
                   style=style,
                   title=title,
                   xlabel=xlabel,
                   ylabel=ylabel)
    else:
        # include standard error of the mean (sem) in the plot
        myplt.line_fill_between(df,
                                sem,
                                save_path,
                                style=style,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting PR curve.')
コード例 #2
0
ファイル: plot_data.py プロジェクト: KarchinLab/2020plus
def receiver_operator_curve(df,
                            save_path,
                            style,
                            sem=None,
                            title='ROC Curve',
                            xlabel='False-Positive Rate',
                            ylabel='True-Positive Rate'):
    logger.info('Plotting receiver operator curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df,
                   save_path,
                   style=style,
                   title='ROC Curve',
                   xlabel='False-Positive Rate',
                   ylabel='True-Positive Rate')
    else:
        # include standard error of the mean (sem) in plot
        myplt.line_fill_between(df,
                                sem,
                                save_path,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting ROC curve.')
コード例 #3
0
ファイル: plot_data.py プロジェクト: KarchinLab/2020plus
def receiver_operator_curve(df,
                            save_path,
                            style,
                            sem=None,
                            title='ROC Curve',
                            xlabel='False-Positive Rate',
                            ylabel='True-Positive Rate'):
    logger.info('Plotting receiver operator curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df, save_path,
                   style=style,
                   title='ROC Curve',
                   xlabel='False-Positive Rate',
                   ylabel='True-Positive Rate')
    else:
        # include standard error of the mean (sem) in plot
        myplt.line_fill_between(df, sem, save_path,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting ROC curve.')
コード例 #4
0
ファイル: plot_data.py プロジェクト: KarchinLab/2020plus
def precision_recall_curve(df,
                           save_path,
                           style,
                           sem=None,
                           title='Precision-Recall Curve',
                           xlabel='Recall',
                           ylabel='Precision'):
    logger.info('Plotting precision-recall curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df, save_path,
                   style=style,
                   title=title,
                   xlabel=xlabel,
                   ylabel=ylabel)
    else:
        # include standard error of the mean (sem) in the plot
        myplt.line_fill_between(df, sem, save_path,
                                style=style,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting PR curve.')
コード例 #5
0
ファイル: plot_data.py プロジェクト: gupnip/2020plus
def tsg_mutations_parameter(df, save_path, title='', xlabel='', ylabel=''):
    logger.info('Plotting tsg mutations while varying tsg score')
    myplt.line(df, save_path, title=title, ylabel=ylabel, xlabel=xlabel)
    logger.info('Finished plotting.')
コード例 #6
0
ファイル: plot_data.py プロジェクト: gupnip/2020plus
def onco_mutations_parameter(df, save_path, title='', xlabel='', ylabel=''):
    logger.info('Plotting oncogene mutations while varying recurrent '
                'parameter')
    # df.index.name = 'Oncogene Score'
    myplt.line(df, save_path, title=title, ylabel=ylabel, xlabel=xlabel)
    logger.info('Finished plotting.')