####---- Differential Expression Signatures ORA Enriched Gene Sets (Box Plots) ----####

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*>
for (signature in 1:nrow(signature_summary))
{
  all_gene_sets = read.table(file=paste0("data/statistical_analysis/differential_expression_signature/over_representation_analysis/<*type*>/signature_",signature,"/all_gene_sets_results.csv"), header=TRUE, sep='\t', quote='',check.names = TRUE)
  enriched_gene_sets = read.table(file=paste0("data/statistical_analysis/differential_expression_signature/over_representation_analysis/<*type*>/signature_",signature,"/enriched_gene_sets_results.csv"), header=TRUE, sep='\t', quote='',check.names = TRUE)
  top_10_gene_sets = get_top10_oras_by_p_value(all_gene_sets,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/differential_expression_signature/signature_ora_boxplots/<*type*>/<*/path*>signature_",signature,".no_",gene_set_index,"_most_enriched_gene_set.png",sep=""))
  }
}
<*/per_ora*>
