This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gene Labels (ggplot2)

Hello,

I'm new to R and I've been trying to label genes on a scatterplot using ggplot2. I've been using geom_text_repel to label the genes. How can I make the gene labels look nicer?

  geom_text_repel(data = normalized_all_counts.ATG9, 
              aes(x=avg_rep1, 
                  y=avg_rep2, 
                  label = gene), color = 'red', 
              max.overlaps = Inf

enter image description here

labels ggplot2 r

While this is not a bioinformatics question.

  • What gene name will add to the plot?
  • What about make them into groups and use specific color with each gene group? (you have a lot of points and concentrated in a narrow region, adding gene names will make it hard to follow)
  • I do not know but, does heatmap may be better especially if you want to show the names of the genes.

You need to zoom into the region close to origin otherwise the differences will not be clear, and putting gene names will not help you much either. You may also try log-transforming the axes

0 answers

No answers yet.

Log in to answer this question.