The support.bioconductor.org editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

Question: kegga error from edgeR
0
gravatar for Biologist
12 months ago by
Biologist70
Biologist70 wrote:

Hi,

I'm doing differential analysis with edgeR. In that package goana function worked well for Gene ontology but kegga is giving some error.

head(de)
           logFC unshrunk.logFC   logCPM       PValue         FDR
58527   2.919535       2.919771 5.010376 4.367288e-06 0.003949316
111    -4.106972      -4.107831 4.357303 1.555287e-06 0.002932518
55969   3.894210       3.895717 3.333907 6.711165e-06 0.004988639
23492  -2.348775      -2.348888 5.475329 4.212049e-06 0.003949316
23268  -2.445401      -2.445518 5.516678 2.048047e-06 0.003181348
143244  3.754845       3.757757 2.245613 4.540069e-06 0.003949316

keg <- kegga(de, species="Hs")

Error in `[[<-.data.frame`(`*tmp*`, s, value = c("0.00394931550141463",  : 
  replacement has 7 rows, data has 30

Any help is greatly appreciated !! thank you.

ADD COMMENTlink modified 12 months ago by Gordon Smyth36k • written 12 months ago by Biologist70
Answer: kegga error from edgeR
0
gravatar for Gordon Smyth
12 months ago by
Gordon Smyth36k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth36k wrote:

When you run kegga() in edgeR, the de argument is supposed to be a fitted model object (DGELRT or DGEExact). Please type help("kegga.DGELRT") for documentation.

You have seem to have instead input a data.frame. That will generally give an error because kegga() isn't intended to accept a data.frame. Even it doesn't give an error, the results will be nonsense because kegga will try to interpret each column of the data.frame as a vector of gene IDs.

goana() and kegga() are exactly the same in this respect. If kegga() gives an error, then goana() will also give an error if run on the same arguments.

I don't know what your data.frame represents. It looks like you might have run glmTreat and then extracted the data.frame from the table component of the topTags output. Wouldn't it be simpler to just run kegga and goana in the documented way? You can use

lrt <- glmTreat( ... )
k <- kegga(lrt)
g <- goana(lrt)

Apart from being correct, wouldn't that be easier? It cuts out several steps you seem to have done.

 

ADD COMMENTlink modified 12 months ago • written 12 months ago by Gordon Smyth36k

For goana() I have given a dataframe which looks like above. It worked. I don't why it is not working for kegga()

ADD REPLYlink written 12 months ago by Biologist70

Sorry, but what you say is not right. You cannot give give a data.frame to either goana() or kegga(). It's just wrong, and it will generally give an error. Even if the functions don't generate an error, the results will still be nonsense.

Why not just follow the documented way to run these functions?

ADD REPLYlink modified 12 months ago • written 12 months ago by Gordon Smyth36k
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 16.09
Traffic: 400 users visited in the last hour