federicogiorgi / corto

corto (Correlation Tool): an R package to generate correlation-based DPI networks
20 stars 7 forks source link

mra and mraplot for single expression matrix and regulon object #1

Open selcant opened 3 years ago

selcant commented 3 years ago

Hi! First, thank you for this package, it is great! I was trying to use mra, mraplot with a single expression matrix and realized that the return object was only a matrix. I think this line that is present in the first part of the if/else statement is missing in the else part:

outlist<-list(nes=nes,pvalue=z2p(nes),sig=sig,regulon=regulon)
return(outlist)

Thank you.

federicogiorgi commented 3 years ago

Hi Selcan!

First of all, thanks for using corto, I truly appreciate it!

I've checked the line of code you mention, in mra.R, line 153

outlist<-list(nes=nes,pvalue=z2p(nes),sig=sig,regulon=regulon)

When the input is only a matrix, the output is a matrix with the same sample structure, but with centroids as rows. That's why the output in that case is simply (mra.R, line 226)

return(nes)

The provided regulon is unnecessary because this object cannot be plotted with mraplot, same goes for the signature. If you want, you can convert it to a pvalue matrix using the corto function p2z: pvalues<-apply(nes,2,p2z) Remember that pvalues are not corrected in this matrix!

Federico

On Mon, 2 Nov 2020 at 12:35, Selcan Aydin notifications@github.com wrote:

Hi! First, thank you for this package, it is great! I was trying to use mra, mraplot with a single expression matrix and realized that the return object was only a matrix. I think this line that is present in the first part of the if/else statement is missing in the else part:

outlist<-list(nes=nes,pvalue=z2p(nes),sig=sig,regulon=regulon) return(outlist)

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/federicogiorgi/corto/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKWILDPKY55LKVO57BIZ6LSN2KPRANCNFSM4THLNLVA .