Question: Ma plot labelling
2
gravatar for op263
4.3 years ago by
op26330
op26330 wrote:

Hi there, I'm trying to generate a graph with the results from my first RNA seq experiment. I just used R for the first time few days ago and I'm still a bit lost with it.

I managed to make a nice plot with the script below but I'd like to label specific dot on the graph (eg: BCL2, BCL3, SYK...). So far I didn't find any solution for that. Can anyone help me with that?

Best Olivier

#to make MA plot 

res <- read.table("result.txt", header=TRUE)
head(res)

with(res, plot(log2FoldChange, baseMean, pch = 20,  main="MAplot", cex = 0.8, log = "y", xlim=c(-8.5,8.5)))
with(subset(res, padj < 0.0001), points(log2FoldChange,baseMean,  col = "grey",pch = 20))
with(subset(res, abs(log2FoldChange)>2), points(log2FoldChange, baseMean, pch=20, col="orange"))
with(subset(res, padj<0.0001 & abs(log2FoldChange)>4), points(log2FoldChange, baseMean,  pch=20, col="red"))
rna-seq R • 3.0k views
ADD COMMENTlink modified 2.1 years ago by Renesh2.0k • written 4.3 years ago by op26330

Hi op263, You can use the 101010 option to format code blocks, making it easier to read here. Cheers, Wouter

ADD REPLYlink written 4.3 years ago by WouterDeCoster45k
1
gravatar for Renesh
2.1 years ago by
Renesh2.0k
United States
Renesh2.0k wrote:

Easy to understand and visualize MA plot for RNA-seq data: https://reneshbedre.github.io/blog/ma.html

ADD COMMENTlink written 2.1 years ago by Renesh2.0k
0
gravatar for GZ1995
4.3 years ago by
GZ1995400
GZ1995400 wrote:

You can simply using text the same way as you use points, or take a look at ggrepel, which is a lillte bit fancier.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by GZ1995400
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1964 users visited in the last hour
_