annotated XY plot (volcano plot) with glimma
0
1
Entering edit mode
4.3 years ago

Hello,

I am trying to use glimma to generate an interactive volcano plot of differentially expressed genes, found with EdgeR.

I would like to add annotations to this plot, so that when you hover a point, you get the name of the gene. However, I get an error message every time.

Here is my code (I use shiny) :

glXYPlot(x= de.df()$logFC,  
           y=-log10(de.df()$FDR),  
            xlab="logFC",   
            ylab="-log(FDR)",   
            status=de.df()$FDR <= 0.05,   
            anno=as.vector(de.df()$genes))

```

de.df looks like this:

              genes    logFC    logCPM       LR       PValue         FDR                                                
ENSG00000018625 CXorf56 4.731732  7.700889 21.57148 3.408840e-06 0.005551464 
ENSG00000065534    SPEN 4.131256 12.597048 19.89395 8.185875e-06 0.005551464 
ENSG00000007933 DNAJC11 5.340935  5.797704 19.28277 1.127190e-05 0.005551464     
ENSG00000091986  CCDC80 3.829369 11.839320 18.55905 1.647217e-05 0.005551464 
ENSG00000022267     C8B 3.820883 11.532498 18.43854 1.754731e-05 0.005551464 
ENSG00000007908   TEAD3 5.402253  6.162232 18.41020 1.781025e-05 0.005551464

And the error I get is:

Warning: Error in checkThat: Second argument should contain the first.

I really don't understand what the problem is.

Does anyone have any idea ?

RNA-Seq R glimma volcano • 1.7k views
ADD COMMENT
0
Entering edit mode

de.df()$logFC => the () after de.df do not really make sense, do they? Parentheses after variable names indicate a function. Try removing all () after that variable in every line of code.

ADD REPLY
0
Entering edit mode

I use the () because this is shiny code and you need it to call the result (here a dataframe) of a reactive expression.

I also tried this code in a plain R script, so without the parenthesis and reactive expressions, but I have the same error so I think it's not the problem.

ADD REPLY
0
Entering edit mode

can you do some thing like this? (replace df with de.df and assumption is that Ensembl IDs are row names of the data frame):

ga2=data.frame(GeneID=df$genes, row.names=row.names(df))
glXYPlot(df$logFC,-log10(df$FDR),
         xlab="logFC",
         ylab="-log(FDR)",
         status=as.numeric(df$FDR <= 0.05),
         anno=ga2)

column name GeneID is mandatory.

ADD REPLY

Login before adding your answer.

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