I've performed KEGG pathway analyses using the GOseq package and now I was wondering how do I know which genes were included in the "numDEInCat"? See below for example:
Unfortunately this doesn't work. The 5th command ( "allKEGG_sig <- allKEGGs[allKEGGs$values %in% enriched.kegg,]") does not work as it gives no data. Any other solutions?
# Up until command # 4 (KEGG.sig) everything seems to work. The 5th command (allKEGG_sig) gives howerever the following "error" when I checked if the command works:
> allKEGG_sig
[1] values ind
<0 rows> (or 0-length row.names)
First, you'll need to adjust your p-values for multiple testing. The p-values that you use now are not corrected for this yet.
However, if you ignore this fact (which is not wise), your new script in line 5 still has the enriched.kegg part (which you didn't make in your script). So replace it with your KEGG.sig$category.
# However, the last command does not work:
allKEGG_sig2 <- allKEGG_sig[allKEGG_sig$ind %in% sig_genes,]
# It gives the following error:
> allKEGG_sig2 <- allKEGG_sig[allKEGG_sig$ind %in% sig_genes,]
Error in allKEGG_sig$ind %in% sig_genes : object 'sig_genes' not found
Do you have enriched kegg pathways?
Try:
You can also skip the enriched.kegg step of course, but you'll get pathways that are not significantly enriched...
Does this work?, if not please show some code and errors given by R. It's hard to blind code here.
# These are the significant KEGGs (So yes, there are significant categories):
> KEGG.sig
category over_represented_pvalue under_represented_pvalue numDEInCat numInCat
86 01100 0.004357014 0.9992979 7 1179
74 00785 0.005852647 0.9999894 1 3
35 00450 0.033955040 0.9994927 1 17
17 00230 0.048094216 0.9952265 2 172
# Up until command # 4 (KEGG.sig) everything seems to work. The 5th command (allKEGG_sig) gives howerever the following "error" when I checked if the command works:
> allKEGG_sig
[1] values ind
<0 rows> (or 0-length row.names)
Thank you so far for your help/efforts.
All right, I see two problems...
First, you'll need to adjust your p-values for multiple testing. The p-values that you use now are not corrected for this yet.
However, if you ignore this fact (which is not wise), your new script in line 5 still has the
enriched.kegg
part (which you didn't make in your script). So replace it with yourKEGG.sig$category
.