-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ggmaplot label specific genes #70
Comments
Hi, @apastore ggmaplot(...) + geom_label_repel(data = subset(your_data_frame, gene %in% your_vector_of_specific_gene_names),
mapping = aes(label = as.vector(gene),
x = log2(baseMean),
y = log2FoldChange),
box.padding = unit(0.35, "lines"),
point.padding = unit(0.3, "lines"),
force = 1,
fontface = "bold",
size = 10/3) Here I am assuming you have a |
fixed now, thanks! New argument library(ggpubr)
data(diff_express)
# Default plot
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 15
) # Select specific genes to show
# set top = 0, then specify genes using label.select argument
ggmaplot(diff_express, main = expression("Group 1" %->% "Group 2"),
fdr = 0.05, fc = 2, size = 0.4,
genenames = as.vector(diff_express$name),
ggtheme = ggplot2::theme_minimal(),
top = 0, label.select = c("BUB1", "CD83")
) Created on 2020-05-10 by the reprex package (v0.3.0.9001) |
Hi I really like this package and the Nice MA plots. I was wondering if is possible to label specific genes instead of the top xx only.
Thanks a lot for this!
Alessandro
The text was updated successfully, but these errors were encountered: