####---- ORA Enriched Gene Sets (Boxplot) ----####

plot_height = 250
plot_width = 1000
box_transparency = 0.75
box_line_thickness = 0.75
box_colours = default_sample_group_colours 	# note: changing this won't change the order the groups appear in the x axis. Merely what they are coloured as.
box_labels = default_sample_group_labels	# note: changing this won't change the order the groups appear in the x axis. Merely what they are named as.
x_axis_label = ""
y_axis_label = "expression (z-score)"
legend_position = "right"

<*per_ora*>
top_10_gene_sets = get_top10_oras_by_p_value(<*type*>_all_gene_sets,<*type*>_all_signficant_genes_enriched_gene_sets,"enrichment")
for(gene_set_index in 1:10)
{
  gene_set = top_10_gene_sets[gene_set_index,]
  plot_title = gene_set[["gene_set"]]
  ggp = make_ora_boxplot(gene_set,plot_title,box_transparency,box_line_thickness,box_colours,box_labels,x_axis_label,y_axis_label,legend_position)
  save_plot(ggp,plot_height,plot_width,paste("<*path*>plots/over_representation_analysis/<*type*>/enriched_amongst_all_significant_genes/no.",gene_set_index,"_most_enriched_gene_set.png<*/path*>",sep=""))
}

top_10_gene_sets = get_top10_oras_by_p_value(<*type*>_downregulated_gene_sets,<*type*>_downregulated_enriched_gene_sets,"enrichment")
for(gene_set_index in 1:10)
{
  gene_set = top_10_gene_sets[gene_set_index,]
  plot_title = gene_set[["gene_set"]]
  ggp = make_ora_boxplot(gene_set,plot_title,box_transparency,box_line_thickness,box_colours,box_labels,x_axis_label,y_axis_label,legend_position)
  save_plot(ggp,plot_height,plot_width,paste("<*path*>plots/over_representation_analysis/<*type*>/enriched_amongst_downregulated_genes/no.",gene_set_index,"_most_enriched_gene_set.png<*/path*>",sep=""))
}

top_10_gene_sets = get_top10_oras_by_p_value(<*type*>_upregulated_gene_sets,<*type*>_upregulated_enriched_gene_sets,"enrichment")
for(gene_set_index in 1:10)
{
  gene_set = top_10_gene_sets[gene_set_index,]
  plot_title = gene_set[["gene_set"]]
  ggp = make_ora_boxplot(gene_set,plot_title,box_transparency,box_line_thickness,box_colours,box_labels,x_axis_label,y_axis_label,legend_position)
  save_plot(ggp,plot_height,plot_width,paste("<*path*>plots/over_representation_analysis/<*type*>/enriched_amongst_upregulated_genes/no.",gene_set_index,"_most_enriched_gene_set.png<*/path*>",sep=""))
}

<*/per_ora*>

