Closed TomSmithCGAT closed 2 years ago
Apologies, I'm going to co-opt this PR and add some tests for the GO enrichment functions. For now I've just added a small data.frame with the results of a differential enrichment analysis (i.e. UniProt accessions, p-values, etc...) which I'll use to test get_enriched_go()
and friends.
That's great. I've got another plotting function to add sitting on a separate branch so I'll add that here instead.
I think there is a Windows-specific error with my GO tests so I'll have to try it on my Windows laptop at home.
This rather large PR (in hindsight it is better to keep them small and merge quickly) now includes the following:
plot_go()
function for plotting GO enrichment results quicklydep_gene2cat
dataset which is used for speeding up GO tests, and can be used as an example in vignettes etc.remove_redundant_go()
to catch instances where the GO term does not match to an ontology
Small debug.
As per
get_ancestor_go
, inremove_redundant_go
, we need to catch instances where the GO term does not match to an ontology, since this throws an error downstream.Copied the same lines from above function. Could consider re-factoring code to include a
get_ontologies
function.