volcano plot in r
1
0
Entering edit mode
azhar • 0
@azhar-11661
Last seen 7.6 years ago

I have this kind of  data

    genes Foldchange      P.value
1           AK133159   6.746424 1.845362e-02
2           AK132892   6.689709 3.576893e-03
3 ENSMUST00000163068   6.540604 2.632250e-04
4 ENSMUST00000163068   6.540604 2.632250e-04
5         uc007tcs.1   6.214373 3.466160e-07
6           AK006017   5.290344 2.082110e-04

I am running this code to get volcano plot but I have problem that

par(mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01)

plot(gene_list$logFC, -log10(gene_list$P.Value),

     xlim=c(-10, 10), ylim=c(0, 15), #Set limits

     xlab="log2 fold change", ylab="-log10 p-value")#Set axis labels

error is like

 

Error in log10(gene_list$P.Value) : 
  non-numeric argument to mathematical function

 

microarray • 1.6k views
ADD COMMENT
1
Entering edit mode
tassos.dam ▴ 10
@tassosdam-11612
Last seen 22 months ago
Sweden

Have tried to use str to see that you actually have a numeric column for the p values?

Use

str(yourGeneListObject)

and it will show you what kind of data you have in your columns.

Apart from that if your object and code look exactly as you have typed them here, you have misspelled the P.value column when you call it in your -log10 function.

 

Cheers

ADD COMMENT

Login before adding your answer.

Traffic: 418 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