Closed jjb-hub closed 8 months ago
see histogram.py buildHueHistogram(title, ylabel, data, order, x=None, y=None, hue=None, palette=None, hue_order=None, significance_infos=None)
I would like to have the stars plotted above a specific hue (treatment) within an xtick (region) for significant tukey results relative to a vehicle.
this is what i am trying to do from line 149 down, the issue is finding the correct x_position to feed to ax.annotate() it seems that each bar is accessed by a number and assigned the label of the hue (e.g. 'vehicles') is bar 1 (ax_region, line 168) if i could just feed the correct x_position i would imagine the rest can be made to work quite easily.
I could continue on it but it would be a very hacky fix essentially calculating the x_position based on the order of regions and the number of hues (treatments in the experiment).... i am getting really behind on the poster so i will stop this for now and maybe you have some useful insight or can help me make this function less of a dumpsterfire (more generic and modular, eventualy). I have done my best to explain please call if needed. @remicorne
STATS / STARS:
ideally i would be able to select pairings that i would like to show significance for and then the star_plotter() would take in the pairs and the quantative_stats_df and return the plot with the stars for those pairings (with or without a line) for instance here i would want to sow stars between red-white and grey-black) * the dificulty is the plotting over hues in sns.barplot
reverseability: I would like also to do the plot for multiple compounds for a given region e.g. ''' quantitativeSummary( filename, experiment='dose_response', histogram_type='compound', # compound or region to_plot='CC', # chosen compound or region p_value_threshold=0.05, columns=[ "5HT", "DA", "NA"], # x values to plot from_scratch=True, ) '''
@remicorne let me know how this is going, just updating clearly the needs here:
broken axis for compounds like DA to be visualized in a single figure (this could be done using the broken axis import or plotting two graphs when the mean of all groups in a region are for example > 2SD from that of the rest - see VM,VL,DM,DL for DA)
plotting of stars - I would like to display starts , , above all bars that differ significantly from their control value and also pass the one-way ANOVA (and two if applicable)
@remicorne this is the same as issue 22 I am cleaning issues - which is clearest to you the other i will delete
handle outliers for .... SEE comment below this is less f an issue within this function
right now i am building the stars system for dose_response (hardcoded for diff with vehicle in post hoc test) for SFN poster to show tukey between vehicles above the relevant hue for the relevant region this will need to be improved to