Question: co-expression output format(rcorr.adjust)
1
gravatar for Sam
5 months ago by
Sam110
Sam110 wrote:

Dear All

I want use "rcorr.adjust" (https://rdrr.io/cran/RcmdrMisc/man/rcorr.adjust.html) for gene co-expression analysis but I want to have a the output in one table contain rows , columns name , correlation , P-value and adjust P

any help?

output of rcorr.adjust :
                                 Eucgr.A00001.v2.0 Eucgr.A00003.v2.0 Eucgr.A00004.v2.0
        Eucgr.A00001.v2.0            1.0000            0.1926            0.7389
        Eucgr.A00003.v2.0            0.1926            1.0000           -0.0559
        Eucgr.A00004.v2.0            0.7389           -0.0559            1.0000

         Number of observations: 12 


    Pairwise two-sided p-values:
                           Eucgr.A00001.v2.0 Eucgr.A00003.v2.0 Eucgr.A00004.v2.0
        Eucgr.A00001.v2.0                   0.5487            0.0060           
        Eucgr.A00003.v2.0 0.5487                              0.8631           
        Eucgr.A00004.v2.0 0.0060            0.8631                             

         Adjusted p-values (Holm's method)
                          Eucgr.A00001.v2.0 Eucgr.A00003.v2.0 Eucgr.A00004.v2.0
        Eucgr.A00001.v2.0                   1.0000            0.0181           
        Eucgr.A00003.v2.0 1.0000                              1.0000           
        Eucgr.A00004.v2.0 0.0181            1.0000

Expected output:

        row               column             cor   P-value  padj    
        Eucgr.A00001.v2.0 Eucgr.A00003.v2.0 0.1926 0.5487 1.0000
co-expression R • 178 views
ADD COMMENTlink modified 5 months ago by zx87547.8k • written 5 months ago by Sam110
1
gravatar for zx8754
5 months ago by
zx87547.8k
London
zx87547.8k wrote:

In such cases, use str() to check the structure of the object then extracts the bits you need. Once we know the structure of the resulting object, we could do something like below, of course this needs more tinkering to get the output you need, this is just a start:

# using example from the manuals
library(car)
library(RcmdrMisc)
data(Mroz)

res <- rcorr.adjust(Mroz[,c("k5", "k618")])

str(res)

cbind(res$R$r, res$P, res$P.unadj)
#      k5                  k618                k5       k618     k5       k618    
# k5   "1"                 "0.084159872381097" ""       "0.0209" ""       "0.0209"
# k618 "0.084159872381097" "1"                 "0.0209" ""       "0.0209" ""
ADD COMMENTlink written 5 months ago by zx87547.8k
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 2.3.0
Traffic: 970 users visited in the last hour