In [1]:
drive_path = 'c:/'
import numpy as np
import pandas as pd
import os
import sys
import matplotlib.pyplot as plt
from scipy.stats import ks_2samp
from scipy.stats import anderson_ksamp
from scipy.stats import kruskal
from scipy.stats import variation
%matplotlib
import seaborn as sns
In [63]:
#composite.head()
In [64]:
#sns.boxplot(x="Odor", y="value", hue="Group", data=comp_tmp);
In [65]:
#sns.violinplot(x="Odor", y="value", hue="Group", data=comp_tmp);
In [66]:
#sns.barplot(x="Odor", y="value", hue="Group", data=comp_tmp);
In [3]:
comp=pd.read_csv('C:\Users\Annie\Documents\Data\Ca_Imaging\Analysis\Odor_Panel\Composite_MaxDF_NoP.csv')
del comp['Mouse']
comp_sorted=comp.reindex_axis(comp.mean().sort_values().index, axis=1)
comp_labels=pd.DataFrame(comp.Group)
tmp=[comp_labels,comp_sorted]
composite_full=pd.concat(tmp,axis=1)
composite_full.head()
cfull=pd.melt(composite_full,"Group",var_name="Odor")
In [3]:
composite_full.head()
Out[3]:
In [3]:
x=composite_full.rank(axis=1,numeric_only=float,na_option='keep',ascending=False)
comp_labels=pd.DataFrame(comp.Group)
tmp=[comp_labels,x]
comp_ranks=pd.concat(tmp,axis=1)
comp_ranks.head()
Out[3]:
In [4]:
ctrl_cr=comp_ranks[comp_ranks['Group']=='Control']
mint_cr=comp_ranks[comp_ranks['Group']=='Mint']
hex_cr=comp_ranks[comp_ranks['Group']=='Hexanal']
In [10]:
pd.DataFrame({'Group':['Control','Mint','Hexanal']})
Out[10]:
In [20]:
ctrlmr=pd.DataFrame(comp_ranks[comp_ranks['Group']=='Control'].mean(axis=0)).T
mintmr=pd.DataFrame(comp_ranks[comp_ranks['Group']=='Mint'].mean(axis=0)).T
hexmr=pd.DataFrame(comp_ranks[comp_ranks['Group']=='Hexanal'].mean(axis=0)).T
mintmr
Out[20]:
In [41]:
ranks=pd.concat([ctrlmr,mintmr,hexmr])
grouplabels=pd.DataFrame({'Group':['Control','Mint','Hexanal']})
ranks=ranks.reset_index(drop=True)
# tmp=[grouplabels,ranks]
finaldf=pd.concat([grouplabels,ranks],axis=1)
finaldf
Out[41]:
In [44]:
finalmelt=pd.melt(finaldf,"Group",var_name="Odor")
In [42]:
kruskal(ctrl_cr.EB,mint_cr.EB,hex_cr.EB)
Out[42]:
In [46]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk", font_scale=1.8);
plt.figure(figsize=(55, 20));
sns.pointplot(x="Odor", y="value", hue="Group", data=finalmelt,
palette={"Control": "r", "Mint": "g", 'Hexanal': 'b'});
sns.despine()
plt.ylabel('Rank', fontsize=48);
plt.title('Rank of odor response', fontsize=55);
plt.xlabel('Odor', fontsize=48);
plt.legend(loc=2, prop={'size': 48});
Calculate Mean
In [109]:
#Calculate means for each odor
Cctrl=composite_full[composite_full['Group']=='Control']
Cmean=Cctrl.mean()
M=composite_full[composite_full['Group']=='Mint']
Mmean=M.mean()
H=composite_full[composite_full['Group']=='Hexanal']
Hmean=H.mean()
CtrlMDFT=pd.DataFrame(Cmean).transpose()
MMDFT=pd.DataFrame(Mmean).transpose()
HMDFT=pd.DataFrame(Hmean).transpose()
#add group labels back
gnc = pd.DataFrame({'Group':['Control']})
gnm=pd.DataFrame({'Group':['Mint']})
gnh=pd.DataFrame({'Group':['Hexanal']})
Ctmp=[gnc,CtrlMDFT]
Mtmp=[gnm,MMDFT]
Htmp=[gnh,HMDFT]
CtrlMDF=pd.concat(Ctmp,axis=1)
MMDF=pd.concat(Mtmp,axis=1)
HMDF=pd.concat(Htmp,axis=1)
final=[CtrlMDF,MMDF,HMDF]
finalmean=pd.concat(final)
finalmeandf=pd.melt(finalmean,"Group",var_name="Odor")
In [157]:
#plot means
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=finalmeandf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('DF/F', fontsize=48);
plt.title('Mean Peak DF/F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
Calculate Medians
In [8]:
#Calculate medians for each odor
Cctrl=composite_full[composite_full['Group']=='Control']
Cmedian=Cctrl.median()
M=composite_full[composite_full['Group']=='Mint']
Mmedian=M.median()
H=composite_full[composite_full['Group']=='Hexanal']
Hmedian=H.median()
CtrlMedT=pd.DataFrame(Cmedian).transpose()
MMedT=pd.DataFrame(Mmedian).transpose()
HMedT=pd.DataFrame(Hmedian).transpose()
#add group labels back
gnc = pd.DataFrame({'Group':['Control']})
gnm=pd.DataFrame({'Group':['Mint']})
gnh=pd.DataFrame({'Group':['Hexanal']})
Ctmp=[gnc,CtrlMedT]
Mtmp=[gnm,MMedT]
Htmp=[gnh,HMedT]
CtrlMed=pd.concat(Ctmp,axis=1)
MMed=pd.concat(Mtmp,axis=1)
HMed=pd.concat(Htmp,axis=1)
finalmed=[CtrlMed,MMed,HMed]
finalmedian=pd.concat(finalmed)
finalmediandf=pd.melt(finalmedian,"Group",var_name="Odor")
In [9]:
#Plot medians
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=finalmediandf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('DF/F', fontsize=48);
plt.title('Median Peak DF/F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
Calculate and Plot Variance
In [10]:
# Calculate variance
CC=composite_full[composite_full['Group']=='Control']
MM=composite_full[composite_full['Group']=='Mint']
HH=composite_full[composite_full['Group']=='Hexanal']
del CC['Group']
del MM['Group']
del HH['Group']
CvarT=pd.DataFrame(variation(CC)).transpose()
MvarT=pd.DataFrame(variation(MM)).transpose()
HvarT=pd.DataFrame(variation(HH)).transpose()
#add group labels back
gnc = pd.DataFrame({'Group':['Control']})
gnm=pd.DataFrame({'Group':['Mint']})
gnh=pd.DataFrame({'Group':['Hexanal']})
Ctmp=[gnc,CvarT]
Mtmp=[gnm,MvarT]
Htmp=[gnh,HvarT]
CV=pd.concat(Ctmp,axis=1)
MV=pd.concat(Mtmp,axis=1)
HV=pd.concat(Htmp,axis=1)
gn=['Group']
gname = np.array(gn)
odornames=CC.columns.values
columnnames=np.append(gname,odornames)
CV.columns=columnnames
MV.columns=columnnames
HV.columns=columnnames
#Fix BLANK NaNs
CCNB=pd.DataFrame(CC['BLANK'])
CCNB=CCNB.dropna()
CCNBvar=variation(CCNB)
CCNBvars=np.asscalar(CCNBvar)
CV=CV.replace(CV.BLANK[0],CCNBvars)
MMNB=pd.DataFrame(MM['BLANK'])
MMNB=MMNB.dropna()
MMNBvar=variation(MMNB)
MMNBvars=np.asscalar(MMNBvar)
MV=MV.replace(MV.BLANK[0],MMNBvars)
HHNB=pd.DataFrame(HH['BLANK'])
HHNB=HHNB.dropna()
HHNBvar=variation(HHNB)
HHNBvars=np.asscalar(HHNBvar)
HV=HV.replace(HV.BLANK[0],HHNBvars)
complete=[CV,HV,MV]
finalvariance=pd.concat(complete)
finalvariancedf=pd.melt(finalvariance,"Group",var_name="Odor")
In [11]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=finalvariancedf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('COV', fontsize=48);
plt.title('COV Peak DF/F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
Calculate and plot variance for each odor concentration
In [12]:
MSconcvar=finalvariance[['Group','MS 0.01','MS 0.05','MS 0.1']]
Hexconcvar=finalvariance[['Group','Hexanal 0.01','Hexanal 0.05','Hexanal 0.1']]
IAAconcvar=finalvariance[['Group','IAA 0.01','IAA 0.05','IAA 0.1']]
MSconcvardf=pd.melt(MSconcvar,"Group",var_name="Odor")
Hexconcvardf=pd.melt(Hexconcvar,'Group', var_name='Odor')
IAAconcvardf=pd.melt(IAAconcvar,'Group',var_name='Odor')
In [13]:
#Plot COV MS Concentration
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=MSconcvardf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('COV', fontsize=48);
plt.title('COV Peak DF/F - Methyl Salicylate',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [211]:
# Plot COV Hexanal Concentration
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=Hexconcvardf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('COV', fontsize=48);
plt.title('COV Peak DF/F - Hexanal',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [212]:
# Plot COV IAA Concentration
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot(x="Odor", y="value", hue="Group", data=IAAconcvardf,palette={"Control": "r", "Mint": "g",'Hexanal':'b'});
sns.despine()
plt.ylabel('COV', fontsize=48);
plt.title('COV Peak DF/F - Isoamyl acetate',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [3]:
#Get Baselines
bl=pd.read_csv('C:\Users\Annie\Documents\Data\Ca_Imaging\Analysis\Odor_Panel\Composite_Baseline_NoP.csv')
del bl['Mouse']
bl_sorted=bl.reindex_axis(bl.mean().sort_values().index, axis=1)
bl_labels=pd.DataFrame(bl.Group)
tmp=[bl_labels,bl_sorted]
bdf=pd.concat(tmp,axis=1)
bdfull=pd.melt(bdf,"Group",var_name="Odor")
bdfull=bdfull.dropna()
In [5]:
composite_cn=composite_full.columns.tolist()
bdf=bdf[composite_cn]
bdf.head()
Out[5]:
In [56]:
#Turn dataframe into a single column
bdfmelt=pd.melt(bdf,"Group",var_name='Odor')
cfmelt=pd.melt(composite_full,'Group',var_name='Odor')
In [86]:
#Make a dataframe so you can plot the correlation
plotcorr=pd.concat([cfmelt,bdfmelt['value']],axis=1)
plotcorr.tail()
Out[86]:
In [99]:
#Rename these columns to what they're supposed to be
plotcorr.columns=['Group','Odor','DFF','Baseline']
plotcorr.head()
Out[99]:
In [108]:
#Plot Baseline vs. DFF as a scatterplot
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.4);
plotcorr.plot(x='DFF',y='Baseline',kind='scatter')
plt.ylabel('Baseline Intensity');
plt.title('Peak DF/F vs. Baseline');
plt.xlabel('Peak DF/F');
In [101]:
#Calculate the spearman coefficient between DFF and Baseline
#rho is the coefficient, pval is the pvalue
from scipy.stats import spearmanr
rho,pval=spearmanr(plotcorr['DFF'],plotcorr['Baseline'])
rho
Out[101]:
In [42]:
#Corr based on treatment groups
CC=composite_full[composite_full['Group']=='Control']
MM=composite_full[composite_full['Group']=='Mint']
HH=composite_full[composite_full['Group']=='Hexanal']
CB=bdf[bdf['Group']=='Control']
MB=bdf[bdf['Group']=='Mint']
HB=bdf[bdf['Group']=='Hexanal']
CCcorr=CC.corr()
MMcorr=MM.corr()
HHcorr=HH.corr()
CBcorr=CB.corr()
MBcorr=MB.corr()
HBcorr=HB.corr()
Ctrlcorr=CC.corrwith(CB)
Mintcorr=MM.corrwith(MB)
Hexcorr=HH.corrwith(HB)
CtrlCdf=pd.DataFrame(Ctrlcorr)
CtrlCdf=CtrlCdf.transpose()
MintCdf=pd.DataFrame(Mintcorr)
MintCdf=MintCdf.transpose()
HexCdf=pd.DataFrame(Hexcorr)
HexCdf=HexCdf.transpose()
tmp=[CtrlCdf,MintCdf,HexCdf]
CompleteCorrDF=pd.concat(tmp)
In [ ]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=1.8);
plt.figure(figsize=(55,20));
sns.pointplot();
sns.despine()
plt.ylabel('COV', fontsize=48);
plt.title('COV Peak DF/F - Methyl Salicylate',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [317]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(45,20));
ax=sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=cfull);
sns.despine()
plt.ylabel('Peak DF/F', fontsize=48);
plt.title('Peak DF/F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [14]:
# sns.set_context("talk",font_scale=1.9);
# sns.set(style="white", palette="muted", color_codes=True);
# plt.figure(figsize=(8, 6));
# violinplot=sns.violinplot(x="Odor", y="value", hue="Group", data=cfull);
# violinplot.set(ylabel='Peak DF/F');
In [318]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(45,20));
ax=sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=cfull);
sns.despine()
plt.ylabel('Peak DF/F', fontsize=48);
plt.title('Peak DF/F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':48});
In [5]:
MS_full=composite_full[['Group','MS 0.01','MS 0.05','MS 0.1']]
MSdf=pd.melt(MS_full,"Group",var_name="Odor")
MSdf.head()
Out[5]:
In [325]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30, 20));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MSdf);
sns.despine()
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [326]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30, 20));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MSdf);
sns.despine()
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [4]:
MSctrl=MS_full[MS_full['Group'] == 'Control']
MSMS=MS_full[MS_full['Group'] == 'Mint']
MShex=MS_full[MS_full['Group'] == 'Hexanal']
MSctrl.tail()
In [366]:
# Control, MS Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30, 20), sharex=True)
# f.suptitle("Control, MS Concentration", fontsize=40)
sns.despine(left=True)
#data
d = MSctrl['MS 0.01']
e = MSctrl['MS 0.05']
f = MSctrl['MS 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="MS 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="MS 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="MS 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [368]:
# Hexanal, MS Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanal, MS Concentration", fontsize=44)
sns.despine(left=True)
#data
d = MShex['MS 0.01']
e = MShex['MS 0.05']
f = MShex['MS 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="MS 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="MS 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="MS 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [369]:
# Mint, MS Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Mint, MS Concentration", fontsize=44)
sns.despine(left=True)
#data
d = MSMS['MS 0.01']
e = MSMS['MS 0.05']
f = MSMS['MS 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="MS 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="MS 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="MS 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [23]:
H_full=composite_full[['Group','Hexanal 0.01','Hexanal 0.05','Hexanal 0.1']]
Hdf=pd.melt(H_full,"Group",var_name="Odor")
In [370]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30,20));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Hdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [328]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30,20));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Hdf);
sns.despine()
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [178]:
Hctrl=H_full[H_full['Group'] == 'Control']
HMS=H_full[H_full['Group'] == 'Mint']
HH=H_full[H_full['Group'] == 'Hexanal']
HH.head()
Out[178]:
In [373]:
# Control, Hexanal Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Control, Hexanal Concentration", fontsize=44)
sns.despine(left=True)
#data
d = Hctrl['Hexanal 0.01']
e = Hctrl['Hexanal 0.05']
f = Hctrl['Hexanal 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Hexanal 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Hexanal 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [372]:
# Hexanal, Hexanal Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanal, Hexanal Concentration", fontsize=44)
sns.despine(left=True)
#data
d = HH['Hexanal 0.01']
e = HH['Hexanal 0.05']
f = HH['Hexanal 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Hexanal 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Hexanal 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [374]:
# Mint, Hexanal Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Mint, Hexanal Concentration", fontsize=44)
sns.despine(left=True)
#data
d = HMS['Hexanal 0.01']
e = HMS['Hexanal 0.05']
f = HMS['Hexanal 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Hexanal 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Hexanal 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [35]:
IAA_full=composite_full[['Group','IAA 0.01','IAA 0.05','IAA 0.1']]
IAAdf=pd.melt(MS_full,"Group",var_name="Odor")
In [329]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30,20));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [331]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=4.3);
plt.figure(figsize=(30,20));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [182]:
Ictrl=IAA_full[IAA_full['Group'] == 'Control']
IMS=IAA_full[IAA_full['Group'] == 'Mint']
IH=IAA_full[IAA_full['Group'] == 'Hexanal']
IH.head()
Out[182]:
In [375]:
# Control, IAA Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Control, IAA Concentration", fontsize=44)
sns.despine(left=True)
#data
d = Ictrl['IAA 0.01']
e = Ictrl['IAA 0.05']
f = Ictrl['IAA 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="IAA 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="IAA 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="IAA 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [376]:
# Hexanal, IAA Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanal, IAA Concentration", fontsize=44)
sns.despine(left=True)
#data
d = IH['IAA 0.01']
e = IH['IAA 0.05']
f = IH['IAA 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="IAA 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="IAA 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="IAA 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [377]:
# Mint, IAA Concentration
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Mint, IAA Concentration", fontsize=44)
sns.despine(left=True)
#data
d = IMS['IAA 0.01']
e = IMS['IAA 0.05']
f = IMS['IAA 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="IAA 0.01")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="IAA 0.05")
sns.distplot(f, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="IAA 0.1")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="b", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="r", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="b",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="r",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
Methyl Salicylate
In [8]:
odor = 'MS'
In [9]:
xdf=composite_full[['Group', '%s 0.01' % odor, '%s 0.05' % odor, '%s 0.1' % odor]]
In [11]:
xctrl = xdf[xdf['Group'] == 'Control']
xMS = xdf[xdf['Group'] == 'Mint']
xHex = xdf[xdf['Group'] == 'Hexanal']
In [17]:
kruskal(xctrl['%s 0.01'%odor],xctrl['%s 0.05'%odor],xctrl['%s 0.1'%odor],nan_policy='omit')
Out[17]:
In [6]:
MSctrl=MS_full[MS_full['Group'] == 'Control']
MSMS=MS_full[MS_full['Group'] == 'Mint']
MShex=MS_full[MS_full['Group'] == 'Hexanal']
MSctrl.tail()
Out[6]:
In [39]:
kruskal(MSctrl['MS 0.01'],MSctrl['MS 0.05'],MSctrl['MS 0.1'],nan_policy='omit')
Out[39]:
In [40]:
kruskal(MSMS['MS 0.01'],MSMS['MS 0.05'],MSMS['MS 0.1'],nan_policy='omit')
Out[40]:
In [41]:
kruskal(MShex['MS 0.01'],MShex['MS 0.05'],MShex['MS 0.1'],nan_policy='omit')
Out[41]:
Hexanal
In [43]:
Hctrl=H_full[H_full['Group'] == 'Control']
HMS=H_full[H_full['Group'] == 'Mint']
HH=H_full[H_full['Group'] == 'Hexanal']
HH.head()
Out[43]:
In [44]:
kruskal(Hctrl['Hexanal 0.01'],Hctrl['Hexanal 0.05'],Hctrl['Hexanal 0.1'],nan_policy='omit')
Out[44]:
In [45]:
kruskal(HMS['Hexanal 0.01'],HMS['Hexanal 0.05'],HMS['Hexanal 0.1'],nan_policy='omit')
Out[45]:
In [46]:
kruskal(HH['Hexanal 0.01'],HH['Hexanal 0.05'],HH['Hexanal 0.1'],nan_policy='omit')
Out[46]:
IAA
In [47]:
Ictrl=IAA_full[IAA_full['Group'] == 'Control']
IMS=IAA_full[IAA_full['Group'] == 'Mint']
IH=IAA_full[IAA_full['Group'] == 'Hexanal']
IH.head()
Out[47]:
In [48]:
kruskal(Ictrl['IAA 0.01'],Ictrl['IAA 0.05'],Ictrl['IAA 0.1'],nan_policy='omit')
Out[48]:
In [49]:
kruskal(IMS['IAA 0.01'],IMS['IAA 0.05'],IMS['IAA 0.1'],nan_policy='omit')
Out[49]:
In [50]:
kruskal(IH['IAA 0.01'],IH['IAA 0.05'],IH['IAA 0.1'],nan_policy='omit')
Out[50]:
In [18]:
MS001_full=composite_full[['Group','MS 0.01']]
MS001df=pd.melt(MS001_full,"Group",var_name="Odor")
In [403]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MS001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [404]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MS001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [19]:
MS001ctrl=MS001_full[MS001_full['Group'] == 'Control']
MS001MS=MS001_full[MS001_full['Group'] == 'Mint']
MS001H=MS001_full[MS001_full['Group'] == 'Hexanal']
MS001H.head()
Out[19]:
In [406]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("MS 0.01", fontsize=44)
sns.despine(left=True)
#data
d = MS001ctrl['MS 0.01']
e = MS001MS['MS 0.01']
f = MS001H['MS 0.01']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [407]:
kruskal(MS001_full[MS001_full['Group'] == 'Control']['MS 0.01'],MS001_full[MS001_full['Group'] == 'Mint']['MS 0.01'],MS001_full[MS001_full['Group'] == 'Hexanal']['MS 0.01'],nan_policy='omit')
Out[407]:
In [4]:
MS005_full=composite_full[['Group','MS 0.05']]
MS005df=pd.melt(MS005_full,"Group",var_name="Odor")
In [5]:
cg=MS005_full[MS005_full['Group']=='Control']
mg=MS005_full[MS005_full['Group']=='Mint']
hg=MS005_full[MS005_full['Group']=='Hexanal']
hg.head()
Out[5]:
In [6]:
from scipy.stats import zscore
In [66]:
test=zscore(MS005_full[MS005_full['Group']=='Control']['MS 0.05'])
test
Out[66]:
In [67]:
cgz=zscore(cg['MS 0.05'])
mgz=zscore(mg['MS 0.05'])
hgz=zscore(hg['MS 0.05'])
cgz
Out[67]:
In [63]:
sns.distplot(cgz)
sns.distplot(mgz)
sns.distplot(hgz)
Out[63]:
In [75]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.distplot(cgz, color="r", kde_kws={"shade": True},hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,label="Control")
sns.distplot(mgz, color="g", kde_kws={"shade": True},hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,label="Mint")
sns.distplot(hgz, color="b", kde_kws={"shade": True},hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,label="Hexanal")
sns.despine();
plt.legend(loc='upper right');
plt.xlabel('Z-score');
plt.title('Z-scores for MS');
In [5]:
MS005_full=composite_full[['Group','MS 0.05']]
MS005df=pd.melt(MS005_full,"Group",var_name="Odor")
cg=MS005_full[MS005_full['Group']=='Control']
mg=MS005_full[MS005_full['Group']=='Mint']
hg=MS005_full[MS005_full['Group']=='Hexanal']
In [6]:
from scipy.stats import gaussian_kde
In [7]:
from scipy.signal import find_peaks_cwt
In [8]:
gkde=gaussian_kde(cg['MS 0.05'])
In [10]:
sns.distplot(cg['MS 0.05'])
Out[10]:
In [15]:
x=np.arange(-1,5,0.01)
y=gkde.evaluate(y)
In [22]:
plt.plot(x,y)
Out[22]:
In [23]:
from scipy import signal
In [34]:
np.amax(y)
Out[34]:
In [410]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MS005df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [411]:
MS005ctrl=MS005_full[MS005_full['Group'] == 'Control']
MS005MS=MS005_full[MS005_full['Group'] == 'Mint']
MS005H=MS005_full[MS005_full['Group'] == 'Hexanal']
MS005H.head()
Out[411]:
In [412]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("MS 0.05", fontsize=44)
sns.despine(left=True)
#data
d = MS005ctrl['MS 0.05']
e = MS005MS['MS 0.05']
f = MS005H['MS 0.05']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [413]:
kruskal(MS005_full[MS005_full['Group'] == 'Control']['MS 0.05'],MS005_full[MS005_full['Group'] == 'Mint']['MS 0.05'],MS005_full[MS005_full['Group'] == 'Hexanal']['MS 0.05'],nan_policy='omit')
Out[413]:
In [414]:
MS10_full=composite_full[['Group','MS 0.1']]
MS10df=pd.melt(MS10_full,"Group",var_name="Odor")
In [415]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MS10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [416]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=MS10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [417]:
MS10ctrl=MS10_full[MS10_full['Group'] == 'Control']
MS10MS=MS10_full[MS10_full['Group'] == 'Mint']
MS10H=MS10_full[MS10_full['Group'] == 'Hexanal']
MS10H.head()
Out[417]:
In [418]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("MS 0.1", fontsize=44)
sns.despine(left=True)
#data
d = MS10ctrl['MS 0.1']
e = MS10MS['MS 0.1']
f = MS10H['MS 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [126]:
kruskal(THA_full[THA_full['Group'] == 'Control']['THA'],THA_full[THA_full['Group'] == 'Mint']['THA'],THA_full[THA_full['Group'] == 'Hexanal']['THA'],nan_policy='omit')
Out[126]:
In [419]:
IAA001_full=composite_full[['Group','IAA 0.01']]
IAA001df=pd.melt(IAA001_full,"Group",var_name="Odor")
In [420]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [421]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [422]:
IAA001ctrl=IAA001_full[IAA001_full['Group'] == 'Control']
IAA001MS=IAA001_full[IAA001_full['Group'] == 'Mint']
IAA001H=IAA001_full[IAA001_full['Group'] == 'Hexanal']
IAA001H.head()
Out[422]:
In [423]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("IAA 0.01", fontsize=44)
sns.despine(left=True)
#data
d = IAA001ctrl['IAA 0.01']
e = IAA001MS['IAA 0.01']
f = IAA001H['IAA 0.01']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [424]:
kruskal(IAA001_full[IAA001_full['Group'] == 'Control']['IAA 0.01'],IAA001_full[IAA001_full['Group'] == 'Mint']['IAA 0.01'],IAA001_full[IAA001_full['Group'] == 'Hexanal']['IAA 0.01'],nan_policy='omit')
Out[424]:
In [425]:
IAA005_full=composite_full[['Group','IAA 0.05']]
IAA005df=pd.melt(IAA005_full,"Group",var_name="Odor")
In [426]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA005df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [427]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA005df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [428]:
IAA005ctrl=IAA005_full[IAA005_full['Group'] == 'Control']
IAA005MS=IAA005_full[IAA005_full['Group'] == 'Mint']
IAA005H=IAA005_full[IAA005_full['Group'] == 'Hexanal']
IAA005H.head()
Out[428]:
In [429]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("IAA 0.05", fontsize=44)
sns.despine(left=True)
#data
d = IAA005ctrl['IAA 0.05']
e = IAA005MS['IAA 0.05']
f = IAA005H['IAA 0.05']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [430]:
kruskal(IAA005_full[IAA005_full['Group'] == 'Control']['IAA 0.05'],IAA005_full[IAA005_full['Group'] == 'Mint']['IAA 0.05'],IAA005_full[IAA005_full['Group'] == 'Hexanal']['IAA 0.05'],nan_policy='omit')
Out[430]:
In [437]:
IAA10_full=composite_full[['Group','IAA 0.1']]
IAA10df=pd.melt(IAA10_full,"Group",var_name="Odor")
In [438]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [439]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=IAA10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [440]:
IAA10ctrl=IAA10_full[IAA10_full['Group'] == 'Control']
IAA10MS=IAA10_full[IAA10_full['Group'] == 'Mint']
IAA10H=IAA10_full[IAA10_full['Group'] == 'Hexanal']
IAA10H.head()
Out[440]:
In [441]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("IAA 0.1", fontsize=44)
sns.despine(left=True)
#data
d = IAA10ctrl['IAA 0.1']
e = IAA10MS['IAA 0.1']
f = IAA10H['IAA 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [436]:
kruskal(IAA10_full[IAA10_full['Group'] == 'Control']['IAA 0.1'],IAA10_full[IAA10_full['Group'] == 'Mint']['IAA 0.1'],IAA10_full[IAA10_full['Group'] == 'Hexanal']['IAA 0.1'],nan_policy='omit')
Out[436]:
In [448]:
H001_full=composite_full[['Group','Hexanal 0.01']]
H001df=pd.melt(H001_full,"Group",var_name="Odor")
In [449]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [450]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H001df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [451]:
H001ctrl=H001_full[H001_full['Group'] == 'Control']
H001MS=H001_full[H001_full['Group'] == 'Mint']
H001H=H001_full[H001_full['Group'] == 'Hexanal']
H001H.head()
Out[451]:
In [452]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanal 0.01", fontsize=44)
sns.despine(left=True)
#data
d = H001ctrl['Hexanal 0.01']
e = H001MS['Hexanal 0.01']
f = H001H['Hexanal 0.01']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [453]:
kruskal(H001_full[H001_full['Group'] == 'Control']['Hexanal 0.01'],H001_full[H001_full['Group'] == 'Mint']['Hexanal 0.01'],H001_full[H001_full['Group'] == 'Hexanal']['Hexanal 0.01'],nan_policy='omit')
Out[453]:
In [455]:
H005_full=composite_full[['Group','Hexanal 0.05']]
H005df=pd.melt(H005_full,"Group",var_name="Odor")
In [456]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H005df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [457]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H005df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [458]:
H005ctrl=H005_full[H005_full['Group'] == 'Control']
H005MS=H005_full[H005_full['Group'] == 'Mint']
H005H=H005_full[H005_full['Group'] == 'Hexanal']
H005H.head()
Out[458]:
In [460]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanal 0.05", fontsize=44)
sns.despine(left=True)
#data
d = H005ctrl['Hexanal 0.05']
e = H005MS['Hexanal 0.05']
f = H005H['Hexanal 0.05']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [461]:
kruskal(H005_full[H005_full['Group'] == 'Control']['Hexanal 0.05'],H005_full[H005_full['Group'] == 'Mint']['Hexanal 0.05'],H005_full[H005_full['Group'] == 'Hexanal']['Hexanal 0.05'],nan_policy='omit')
Out[461]:
In [462]:
H10_full=composite_full[['Group','Hexanal 0.1']]
H10df=pd.melt(H10_full,"Group",var_name="Odor")
In [463]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [464]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=H10df);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [465]:
H10ctrl=H10_full[H10_full['Group'] == 'Control']
H10MS=H10_full[H10_full['Group'] == 'Mint']
H10H=H10_full[H10_full['Group'] == 'Hexanal']
H10H.head()
Out[465]:
In [466]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("IAA 0.05", fontsize=44)
sns.despine(left=True)
#data
d = H10ctrl['Hexanal 0.1']
e = H10MS['Hexanal 0.1']
f = H10H['Hexanal 0.1']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [468]:
kruskal(H10_full[H10_full['Group'] == 'Control']['Hexanal 0.1'],H10_full[dH10_full['Group'] == 'Mint']['Hexanal 0.1'],H10_full[H10_full['Group'] == 'Hexanal']['Hexanal 0.1'],nan_policy='omit')
Out[468]:
In [296]:
THA_full=composite_full[['Group','THA']]
THAdf=pd.melt(THA_full,"Group",var_name="Odor")
In [360]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=THAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
In [362]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=THAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [341]:
THActrl=THA_full[THA_full['Group'] == 'Control']
THAMS=THA_full[THA_full['Group'] == 'Mint']
THAH=THA_full[THA_full['Group'] == 'Hexanal']
THAH.head()
Out[341]:
In [357]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("2-hydroxyacetophenone", fontsize=44)
sns.despine(left=True)
#data
d = THActrl['THA']
e = THAMS['THA']
f = THAH['THA']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [126]:
kruskal(THA_full[THA_full['Group'] == 'Control']['THA'],THA_full[THA_full['Group'] == 'Mint']['THA'],THA_full[THA_full['Group'] == 'Hexanal']['THA'],nan_policy='omit')
Out[126]:
In [264]:
AP_full=composite_full[['Group','AP']]
APdf=pd.melt(AP_full,"Group",var_name="Odor")
In [335]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=APdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [336]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=APdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [358]:
APctrl=AP_full[AP_full['Group'] == 'Control']
APMS=AP_full[AP_full['Group'] == 'Mint']
APH=AP_full[AP_full['Group'] == 'Hexanal']
APH.head()
Out[358]:
In [359]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("2-hydroxyacetophenone", fontsize=44)
sns.despine(left=True)
#data
d = APctrl['AP']
e = APMS['AP']
f = APH['AP']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [131]:
kruskal(AP_full[AP_full['Group'] == 'Control']['AP'],AP_full[AP_full['Group'] == 'Mint']['AP'],AP_full[AP_full['Group'] == 'Hexanal']['AP'],nan_policy='omit')
Out[131]:
In [332]:
EB_full=composite_full[['Group','EB']]
EBdf=pd.melt(EB_full,"Group",var_name="Odor")
In [337]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=EBdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [338]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=EBdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [363]:
EBctrl=EB_full[EB_full['Group'] == 'Control']
EBMS=EB_full[EB_full['Group'] == 'Mint']
EBH=EB_full[EB_full['Group'] == 'Hexanal']
EBH.head()
Out[363]:
In [364]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("2-hydroxyacetophenone", fontsize=44)
sns.despine(left=True)
#data
d = EBctrl['EB']
e = EBMS['EB']
f = EBH['EB']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [135]:
kruskal(EB_full[EB_full['Group'] == 'Control']['EB'],EB_full[EB_full['Group'] == 'Mint']['EB'],EB_full[EB_full['Group'] == 'Hexanal']['EB'],nan_policy='omit')
Out[135]:
In [378]:
Hone_full=composite_full[['Group','Hexanone']]
Honedf=pd.melt(Hone_full,"Group",var_name="Odor")
In [379]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Honedf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [380]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Honedf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [381]:
Honectrl=Hone_full[Hone_full['Group'] == 'Control']
HoneMS=Hone_full[Hone_full['Group'] == 'Mint']
HoneH=Hone_full[Hone_full['Group'] == 'Hexanal']
HoneH.head()
Out[381]:
In [382]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("Hexanone", fontsize=44)
sns.despine(left=True)
#data
d = Honectrl['Hexanone']
e = HoneMS['Hexanone']
f = HoneH['Hexanone']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [383]:
kruskal(Hone_full[Hone_full['Group'] == 'Control']['Hexanone'],Hone_full[Hone_full['Group'] == 'Mint']['Hexanone'],Hone_full[Hone_full['Group'] == 'Hexanal']['Hexanone'],nan_policy='omit')
Out[383]:
In [384]:
PA_full=composite_full[['Group','PA']]
PAdf=pd.melt(PA_full,"Group",var_name="Odor")
In [385]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=PAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [386]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=PAdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [387]:
PActrl=PA_full[PA_full['Group'] == 'Control']
PAMS=PA_full[PA_full['Group'] == 'Mint']
PAH=PA_full[PA_full['Group'] == 'Hexanal']
PAH.head()
Out[387]:
In [388]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("2-hydroxyacetophenone", fontsize=44)
sns.despine(left=True)
#data
d = PActrl['PA']
e = PAMS['PA']
f = PAH['PA']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [389]:
kruskal(PA_full[PA_full['Group'] == 'Control']['PA'],PA_full[PA_full['Group'] == 'Mint']['PA'],PA_full[PA_full['Group'] == 'Hexanal']['PA'],nan_policy='omit')
Out[389]:
In [391]:
B_full=composite_full[['Group','BLANK']]
Bdf=pd.melt(B_full,"Group",var_name="Odor")
In [392]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Bdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [393]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=3);
plt.figure(figsize=(15,18));
sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=Bdf);
sns.despine();
plt.legend(loc='upper right');
plt.ylabel('Peak DF/F');
plt.title('Peak DF/F');
plt.xlabel('Odor');
In [398]:
Bctrl=B_full[B_full['Group'] == 'Control']
Bctrl=Bctrl.dropna()
BMS=B_full[B_full['Group'] == 'Mint']
BMS=BMS.dropna()
BH=B_full[B_full['Group'] == 'Hexanal']
BH=BH.dropna()
BH.head()
Out[398]:
In [399]:
sns.set(style="white", palette="muted", color_codes=True)
sns.set_context("talk", font_scale=2)
# Set up the matplotlib figure
f, axes = plt.subplots(2, 2, figsize=(30,20), sharex=True)
# f.suptitle("2-hydroxyacetophenone", fontsize=44)
sns.despine(left=True)
#data
d = Bctrl['BLANK']
e = BMS['BLANK']
f = BH['BLANK']
# Plot a simple histogram with binsize determined automatically
sns.distplot(d, kde=False, color="r", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(e, kde=False, color="g", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
sns.distplot(f, kde=False, color="b", hist_kws={"histtype":'step',"linewidth":3,"alpha":0.7},axlabel= False,ax=axes[0, 0])
# Plot a kernel density estimate and rug plot
sns.distplot(d, hist=False, rug=True, color="r", axlabel= False,ax=axes[0, 1],label="Control")
sns.distplot(e, hist=False, rug=True, color="g", axlabel= False,ax=axes[0, 1],label="Mint")
sns.distplot(f, hist=False, rug=True, color="b", axlabel= False,ax=axes[0, 1],label="Hexanal")
# Plot a filled kernel density estimate
sns.distplot(d, hist=False, color="r", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(e, hist=False, color="g", kde_kws={"shade": True}, axlabel=False,ax=axes[1, 0])
sns.distplot(f, hist=False, color="b", kde_kws={"shade": True}, axlabel= False,ax=axes[1, 0])
# Plot a historgram and kernel density estimate
sns.distplot(d, color="r",axlabel= False,ax=axes[1, 1])
sns.distplot(e, color="g",axlabel= False,ax=axes[1, 1])
sns.distplot(f, color="b",axlabel= False,ax=axes[1, 1])
plt.setp(axes, yticks=[])
plt.tight_layout()
In [400]:
kruskal(B_full[B_full['Group'] == 'Control']['BLANK'],B_full[B_full['Group'] == 'Mint']['BLANK'],B_full[B_full['Group'] == 'Hexanal']['BLANK'],nan_policy='omit')
Out[400]:
In [23]:
bl=pd.read_csv('C:\Users\Annie\Documents\Data\Ca_Imaging\Analysis\Odor_Panel\Composite_Baseline_NoP.csv')
del bl['Mouse']
bl_sorted=bl.reindex_axis(bl.mean().sort_values().index, axis=1)
bl_labels=pd.DataFrame(bl.Group)
tmp=[bl_labels,bl_sorted]
bdf=pd.concat(tmp,axis=1)
bdfull=pd.melt(bdf,"Group",var_name="Odor")
bdfull=bdfull.dropna()
In [498]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(45,20));
ax=sns.barplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=bdfull);
sns.despine()
plt.ylabel('Intensity', fontsize=48);
plt.title('Baseline F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':30});
In [518]:
# sns.set_context("talk",font_scale=1.9);
# sns.set(style="white", palette="muted", color_codes=True);
# plt.figure(figsize=(8, 6));
# violinplot=sns.violinplot(x="Odor", y="value", hue="Group", data=bdfull);
# violinplot.set(ylabel='Intensity');
In [502]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(45,20));
ax=sns.boxplot(x="Odor", y="value", hue="Group",palette={"Control": "r", "Hexanal": "b","Mint":"g"}, data=bdfull);
sns.despine()
plt.ylabel('Intensity', fontsize=48);
plt.title('Baseline F',fontsize=55);
plt.xlabel('Odor',fontsize=48);
plt.legend(loc=2,prop={'size':30});
In [20]:
readms=pd.read_csv('C:\Users\Annie\Documents\Data\Ca_Imaging\Analysis\Odor_Panel\Composite_MaxDF_NoP.csv')
ms = readms
del ms['Group']
ms_sorted=ms.reindex_axis(ms.mean().sort_values().index, axis=1)
ms_labels=pd.DataFrame(ms.Mouse)
tmp=[ms_labels,ms_sorted]
msdf=pd.concat(tmp,axis=1)
msfull=pd.melt(msdf,"Mouse",var_name="Odor")
msfull=msfull.dropna()
msfull.head()
Out[20]:
In [522]:
#dictionary of imaging session and labels
msgroups={'160321_3':'r', '160421_2':'r', '160502_1':'r', '160503_1':'r', '160420_1':'r',
'160420_2':'r', '160420_3':'r', '160421_1':'r', '160421_3':'r', '160503_2':'r',
'160310_2':'r', '160310_3':'r', '160321_1':'r', '160321_2':'r', '160517_2':'b',
'160525_1':'b', '160620_1':'b', '160517_1':'b', '160517_3':'b', '160525_2':'b',
'160525_3':'b', '160620_2':'b', '160620_3':'b', '160621_1':'b', '160621_2':'b',
'160622_1':'b', '160622_2':'b', '160626_1':'b', '160626_2':'b', '160330_3':'g',
'160328_1_B':'g', '160428_1_B':'g', '160429_1':'g', '160429_2':'g', '160325_1':'g',
'160325_2':'g', '160325_4':'g', '160328_2':'g', '160328_3':'g', '160330_2':'g',
'160401_1':'g'}
In [529]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(45,20));
ax=sns.barplot(x="Odor", y="value", hue="Mouse",palette={'160321_3':'r', '160421_2':'r', '160502_1':'r', '160503_1':'r', '160420_1':'r',
'160420_2':'r', '160420_3':'r', '160421_1':'r', '160421_3':'r', '160503_2':'r',
'160310_2':'r', '160310_3':'r', '160321_1':'r', '160321_2':'r', '160517_2':'b',
'160525_1':'b', '160620_1':'b', '160517_1':'b', '160517_3':'b', '160525_2':'b',
'160525_3':'b', '160620_2':'b', '160620_3':'b', '160621_1':'b', '160621_2':'b',
'160622_1':'b', '160622_2':'b', '160626_1':'b', '160626_2':'b', '160330_3':'g',
'160328_1_B':'g', '160428_1_B':'g', '160429_1':'g', '160429_2':'g', '160325_1':'g',
'160325_2':'g', '160325_4':'g', '160328_2':'g', '160328_3':'g', '160330_2':'g',
'160401_1':'g'}, data=msfull);
sns.despine()
plt.ylabel('Peak DF/F', fontsize=48);
plt.title('Odor-evoked response, by session',fontsize=55);
plt.xlabel('Odor',fontsize=48);
ax.legend_.remove()
In [14]:
# sns.set(style="white", palette="muted", color_codes=True);
# sns.set_context("talk",font_scale=2.2);
# plt.figure(figsize=(45,20));
# ax=sns.violinplot(x="Odor", y="value", hue="Mouse",palette={'160321_3':'r', '160421_2':'r', '160502_1':'r', '160503_1':'r', '160420_1':'r',
# '160420_2':'r', '160420_3':'r', '160421_1':'r', '160421_3':'r', '160503_2':'r',
# '160310_2':'r', '160310_3':'r', '160321_1':'r', '160321_2':'r', '160517_2':'b',
# '160525_1':'b', '160620_1':'b', '160517_1':'b', '160517_3':'b', '160525_2':'b',
# '160525_3':'b', '160620_2':'b', '160620_3':'b', '160621_1':'b', '160621_2':'b',
# '160622_1':'b', '160622_2':'b', '160626_1':'b', '160626_2':'b', '160330_3':'g',
# '160328_1_B':'g', '160428_1_B':'g', '160429_1':'g', '160429_2':'g', '160325_1':'g',
# '160325_2':'g', '160325_4':'g', '160328_2':'g', '160328_3':'g', '160330_2':'g',
# '160401_1':'g'}, data=msfull);
# sns.despine()
# plt.ylabel('Peak DF/F', fontsize=48);
# plt.title('Odor-evoked response, by session',fontsize=55);
# plt.xlabel('Odor',fontsize=48);
# ax.legend_.remove()
In [531]:
sns.set(style="white", palette="muted", color_codes=True);
sns.set_context("talk",font_scale=2.2);
plt.figure(figsize=(55,40));
ax=sns.boxplot(x="Odor", y="value", hue="Mouse",palette={'160321_3':'r', '160421_2':'r', '160502_1':'r', '160503_1':'r', '160420_1':'r',
'160420_2':'r', '160420_3':'r', '160421_1':'r', '160421_3':'r', '160503_2':'r',
'160310_2':'r', '160310_3':'r', '160321_1':'r', '160321_2':'r', '160517_2':'b',
'160525_1':'b', '160620_1':'b', '160517_1':'b', '160517_3':'b', '160525_2':'b',
'160525_3':'b', '160620_2':'b', '160620_3':'b', '160621_1':'b', '160621_2':'b',
'160622_1':'b', '160622_2':'b', '160626_1':'b', '160626_2':'b', '160330_3':'g',
'160328_1_B':'g', '160428_1_B':'g', '160429_1':'g', '160429_2':'g', '160325_1':'g',
'160325_2':'g', '160325_4':'g', '160328_2':'g', '160328_3':'g', '160330_2':'g',
'160401_1':'g'}, data=msfull);
sns.despine()
plt.ylabel('Peak DF/F', fontsize=48);
plt.title('Odor-evoked response, by session',fontsize=55);
plt.xlabel('Odor',fontsize=48);
ax.legend_.remove()
In [ ]: