python/pymethylprocess/visualizations.py
def plot_cell_type_results(input_csv,outfilename,plot_cols,font_scale):#
    """Plot csv containing cell type results into side by side boxplots."""
    import os
    os.makedirs(outfilename[:outfilename.rfind('/')],exist_ok=True)
    import matplotlib
    matplotlib.use('Agg')
    import seaborn as sns
    sns.set(font_scale=font_scale)
    import matplotlib.pyplot as plt
    plt.figure()
    ax=sns.boxplot(data=pd.read_csv(input_csv,index_col=0).melt(),x='variable',y='value')
    ax.set_xticklabels(ax.get_xticklabels(),rotation=40)
    plt.savefig(outfilename,dpi=300)
Plot csv containing cell type results into side by side boxplots.
Plot csv containing cell type results into side by side boxplots.
Plot csv containing cell type results into side by side boxplots .
def plot_cell_type_results(input_csv,outfilename,plot_cols,font_scale):
    import os
    os.makedirs(outfilename[:outfilename.rfind('/')],exist_ok=True)
    import matplotlib
    matplotlib.use('Agg')
    import seaborn as sns
    sns.set(font_scale=font_scale)
    import matplotlib.pyplot as plt
    plt.figure()
    ax=sns.boxplot(data=pd.read_csv(input_csv,index_col=0).melt(),x='variable',y='value')
    ax.set_xticklabels(ax.get_xticklabels(),rotation=40)
    plt.savefig(outfilename,dpi=300)
def plot_cell_type_results ( input_csv , outfilename , plot_cols , font_scale ) : import os os . makedirs ( outfilename [ : outfilename . rfind ( '/' ) ] , exist_ok = True ) import matplotlib matplotlib . use ( 'Agg' ) import seaborn as sns sns . set ( font_scale = font_scale ) import matplotlib . pyplot as plt plt . figure ( ) ax = sns . boxplot ( data = pd . read_csv ( input_csv , index_col = 0 ) . melt ( ) , x = 'variable' , y = 'value' ) ax . set_xticklabels ( ax . get_xticklabels ( ) , rotation = 40 ) plt . savefig ( outfilename , dpi = 300 )
Plot csv containing cell type results into side by side boxplots.
Plot csv containing cell type results into side by side boxplots .
# """Plot csv containing cell type results into side by side boxplots."""
input_csv
outfilename
plot_cols
font_scale