I'm using the GOexpress package for gene ontology enrichment analysis based on the results of a few RNA-Seq assays. I was wondering if there is a simple way of obtain gene expression heatmaps for several GO terms recursively.
Here is a code using the example data mentioned in the GOexpress manual:
Performing gene ontology enrichment analysis with the command below:
AlvMac_results <- GO_analyse(eSet = AlvMac, f = "Treatment")
Obtaining p-values for the enrichment analysis by permutation (warning - relatively slow function):
AlvMac_results.pVal <- pValue_GO(result = AlvMac_results, N = 100)
Filtering results, for obtaining only GO terms of biological process hierarchy with five or more enriched genes:
BP.5 <- subset_scores(
result = AlvMac_results.pVal,
namespace = "biological_process",
total = 5, # requires 5 or more associated genes
Finally, below is the function that generates the heatmap for this specific GO term (GO:0034142) given as an example in the manual. How do I plot heatmaps for the first few other GO terms (say 10 or 15 results) automatically?
heatmap_GO(go_id = "GO:0034142", result = BP.5, eSet = AlvMac, cexRow = 0.4,
cexCol = 1, cex.main = 1, main.Lsplit = 30)
Thank you for your attention.