This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Hide the up legend in Manhattan plot by gProfiler

Hi, I'm recently i started to using gprofiler (https://biit.cs.ut.ee/gprofiler/page/r), I made a graph with the gostplot function and I want to remove the legend "query_1", I tried modifying the title using layout (title = "UP genes"), but that don´t solve it.

Someone know how to remove or hide the legend. Thank you so much

This is my plot

graph r plotly gprofiler plot

Looks like it might be a facet label. Try removing it using the ggplot theme function.

p <- p + theme(strip.text=element_blank())

This assumes your plot is saved as variable p.

1 answer

Hi! You can rename your gene list(s) in the gost() function by using a named list as a query gene list. For example,

gostres = gost(query = list("UP genes" = c("X:1000:1000000", "rs17396340", "GO:0005005", "ENSG00000156103", "NLRP1")))
gostplot(gostres)

You can have multiple gene lists with your own names there, and then these are the names that are used in the other functions, including gostplot().

Log in to answer this question.