I have been using GOSt in R to run GO analysis and create a plot with various terms highlighted. All went well, data exported etc but as someone relatively unfamiliar with R I have two questions.
- How do I change the point size on the plot? I know how to do this in ggplot, but can't find a command here to do this, even though the cran package says this is now a ggplot object.
- Can I export a plot from R as a PDF (so it would be a vector object in publishing software)? I can only find the options fro jpeg or png.
Thank you! For reference, here is my script:
install.packages("gprofiler2")
library(gprofiler2)
input <- as.vector(Genes_DMR_Stage[,'Gene'])
gostres <- gost(query = input,
organism = "hsapiens", ordered_query = FALSE,
multi_query = FALSE, significant = TRUE, exclude_iea = FALSE,
measure_underrepresentation = FALSE, evcodes = FALSE,
user_threshold = 0.05, correction_method = "fdr",
domain_scope = "annotated", custom_bg = NULL,
numeric_ns = "", sources = NULL, as_short_link = FALSE, highlight = TRUE)
df <- as.data.frame(gostres$result)
df <- apply(da,2,as.character)
write.csv2(df, "GO.csv")
p <- gostplot(gostres, capped = FALSE, interactive = FALSE)
pp <- publish_gostplot(p, highlight_terms = c("GO:0032502", "GO:0048856", "GO:0048869", "GO:0051216", "GO:0060173", "GO:0001501"),
width = NA, height = NA, filename = NULL)