Created
December 11, 2020 02:00
-
-
Save hiraksarkar/c06ee2250fc4993548b4319109144349 to your computer and use it in GitHub Desktop.
some cool plots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.figure(figsize=(8, 8)) | |
df = np.log(variance_trio_df[['var_mean','merged_var']]+1) | |
df.loc[:,'color'] = 'b' | |
df.loc[(df.merged_var - df.var_mean) < -1, 'color'] = 'r' | |
colors = ["b", "r"] | |
customPalette = sns.set_palette(sns.color_palette(colors)) | |
ax = sns.scatterplot( | |
x = 'var_mean', | |
y = 'merged_var', | |
data = df, | |
hue='color', | |
s=10, | |
linewidth=0, | |
alpha = 0.4, | |
palette=customPalette | |
) | |
ax.get_legend().remove() | |
#plt.loglog(x,y) | |
plt.plot(np.linspace(0,15,num=16), np.linspace(0,15,num=16),linewidth=1.0) | |
plt.plot(np.linspace(0,15,num=16), np.linspace(0,15,num=16)-1,'--',linewidth=1.0,color='r') | |
plt.plot(np.linspace(0,15,num=16), np.linspace(0,15,num=16)+1,'--',linewidth=1.0,color='r') | |
plt.grid(True,which="both",ls="-", color='0.65') | |
plt.xlabel('Mean of variances for transcripts to be merged (log)',fontsize = 14) | |
plt.ylabel('Variance of the merged group (log)',fontsize = 14) | |
#plt.legend(frameon=False, loc ='upper left',fontsize=13) | |
ax.tick_params(axis='x', labelsize=12) | |
ax.tick_params(axis='y', labelsize=12) | |
sns.despine() | |
plt.plot(gibbs_df_salmon.loc[hg_isoform_info['groups'][group_id][0]].values, | |
label='{} InfRV: {:0.2f}'.format(hg_isoform_info['groups'][group_id][0], infa), | |
marker = 'o', | |
linestyle='dashed', | |
markersize = 3., | |
linewidth = 1.0 | |
) | |
plt.figure(figsize=(8, 8)) | |
ax = sns.scatterplot(x = 'mean_sum',y = 'metric', | |
data = roll_df , | |
s = 6, | |
linewidth=0, | |
alpha = 0.2) | |
#sns.scatterplot(x = 'mean_1',y = 'ratio', data = roll_df, s = 6, linewidth=0) | |
#plt.hlines(y=-5,xmin=0,xmax = 500000,colors='red') | |
ax.tick_params(axis='y', labelsize=14) | |
#ax.tick_params(axis='y', labelsize=14) | |
transform=ax.get_xaxis_transform() | |
plt.axhline(-1.8,linewidth=1.0, color = 'r') | |
#plt.text(pow(10,4),-20.2,"Cut-off from background $\mathcal{B}$",fontsize=13) | |
plt.ylabel('Change in uncertainty when the pair is collapsed', fontsize = 14) | |
plt.xlabel('Sum of the means of read counts for individual pair', fontsize = 14) | |
plt.tick_params(axis='x', labelsize=14) | |
plt.xscale('log') | |
sns.despine() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment