# Plot the number of cells normalized to 100% sm.pl.stacked_barplot(adata,x_axis='ROI_individual',y_axis='phenotype',method='percent')
123
# specify the elements to be in the plotx_axis_elements=['CD57-low-1','CD57-low-2','CD57-low-3','CD57-high-2','CD57-high-1','CD57-high-3']y_axis_elements=['ASMA+ cells','Myeloid','NK cells','Neutrophils','Other Immune cells','Treg','Tumor']
# quiet a number of parameters to play around:sm.pl.stacked_barplot(adata,x_axis='ROI_individual',y_axis='phenotype',subset_xaxis=x_axis_elements,subset_yaxis=y_axis_elements,order_xaxis=None,order_yaxis=None,method='percent',plot_tool='plotly',matplotlib_cmap=None,matplotlib_bbox_to_anchor=(1,1.02),matplotlib_legend_loc=2,return_data=False)
1
Calculate the fold change in cell types between the different ROI's
# Heatmap of foldchnage sm.pl.foldchange(adata,label='foldchange',method='heatmap',p_val=0.05,nonsig_color='grey',cmap='vlag',log=True,center=0,linecolor='black',linewidths=0.7,vmin=-5,vmax=5,row_cluster=False)
123456789
# Parallel_coordinates plot of the foldchangessm.pl.foldchange(adata,label='foldchange',subset_xaxis=['ASMA+ cells','NK cells','Neutrophils','Treg','Tumor'],log=True,method='parallel_coordinates',invert_axis=True,parallel_coordinates_color=['black','blue','green','red','#000000'],matplotlib_bbox_to_anchor=(1.04,1),matplotlib_legend_loc='upper left',xticks_rotation=90,return_data=False)
12
# save adataadata.write(str(common_path)+'may2022_tutorial.h5ad')