Volcano Plot after using Treat Function
1
0
Entering edit mode
Sanches • 0
@sanches-13853
Last seen 6.7 years ago

Dear all, 

Let me ask you all a question. 

If I want to create a volcano plot after using the treat function, What kind of parameters should I use?  Of note, in this case, all genes do not rank using Log2fold change. Should I use  xlab="treat.lfc" and ylab=" ? " . Could anyone please help me?

Thanks in advance.

`> names(tfit)

"coefficients"    "rank"    "assign"    "qr"     "df.residual"

"sigma"   "stdev.unscaled"    "design" "correlation" "genes"

"Amean"    "cov.coefficients"  "contrasts"   "df.prior"   "s2.prior"

"s2.post"    "df.total"   "t"     "p.value"     "treat.lfc" `

>volcanoplot(tfit,coef=1)

>plot(tfit[,6],-log(tfit[,10],10),coef=1, xlab="log2(Fold-Change)", ylab="-log10(P.Value)",main="Volcano plot",cex=0.1,pch=19)

>abline(v=c(-1,1),col="blue")

>abline(h=-log(0.05,10),col="red")

 

Thanks in advance.

Volcano plot Parameters • 1.5k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 11 hours ago
WEHI, Melbourne, Australia

Your question has made me realize that the volcanoplot() function doesn't currently work with treat(). There's no good reason why it shouldn't, so I'll commit a fix.

Note, the fact that p-values and logFCs give different rankings isn't the problem. If p-values and logFC ranked genes in the same order, then people wouldn't do volcano plots.

The code you give for making your own plot isn't correct. What information were you trying to access by tfit[,6] or tfit[,10]? What did you think this code would do?

If you wanted to make your own volcano plot, for contrast 3 for example, you would use:

logFC <- tfit$coefficients[,3]
pvalue <- tfit$p.value[,3]
plot(logFC, log10(pvalue))

If you wanted to make a volcano plot for contrast 1 you would change both the 3s to 1s.

ADD COMMENT
0
Entering edit mode

Dear Gordon, 

Thanks for your reply. 

I asked it because I got the following error message after run Volcano plot(). I used the above script. I do not know the reason for it. Thanks again. And I ran the eBayes.

volcanoplot(tfit,coef=1)
Error in volcanoplot(tfit, coef = 1) : 
  No B-statistics found, perhaps eBayes() not yet run

ADD REPLY
0
Entering edit mode

OK, I see. I wish you'd mentioned this in your original question. Anyway you are right, volcanoplot() is not currently working with treat().

ADD REPLY
0
Entering edit mode

I wanted to use this code to access treat.lfc and p.value column. Thus, I need to change the old code to tfit[,20] or tfit[,19] to access it. But it s not working. 

 

ADD REPLY

Login before adding your answer.

Traffic: 778 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6