fogellab / multiWGCNA

an R package for deep mining gene co-expression networks in multi-trait expression data
13 stars 2 forks source link

constructNetworks() gives error attempt to set 'rownames' on an object with no dimensions #9

Closed M-Arafat closed 1 month ago

M-Arafat commented 6 months ago

Hi, I wanna express my admiration with multiWGCNA. I am trying to use it on my data but when i use the function constructNetworks() it gives the following error Error in rownames<-(*tmp*, value = traitData[match(rownames(datExpr2), : attempt to set 'rownames' on an object with no dimensions

The whole code DM_networks = constructNetworks(se, sampleTable= meta, conditions1,condition2, networkType = "unsigned", power = 10, minModuleSize = 5, maxBlockSize = 250, reassignThreshold = 0, minKMEtoStay = 0.7, mergeCutHeight = 0.10, numericLabels = TRUE, pamRespectsDendro = FALSE, verbose=3)

-----------------------------------------

my input: se class: SummarizedExperiment dim: 369 18 metadata(0): assays(1): counts rownames(369): A0A024R6I7 A0A068LKP9 ... Q5JQN9 Q5NV82 rowData names(1): row.names.expdata. colnames(18): X12B X12BB ... X14_A7 X14_AA7 colData names(3): Sample Status tissue

meta DataFrame with 18 rows and 3 columns Sample Status tissue

X12B X12B before pancreas X12BB X12BB before pancreas X13B X13B before pancreas X13BB X13BB before pancreas X14B X14B before pancreas ... ... ... ... X12_AA7 X12_AA7 after7 pancreas X13_A7 X13_A7 after7 pancreas X13_AA7 X13_AA7 after7 pancreas X14_A7 X14_A7 after7 pancreas X14_AA7 X14_AA7 after7 pancreas conditions1 [1] "before" "after2" "after7"
dariotommasini commented 6 months ago

Hi @M-Arafat ,

To be honest, I don't remember too well the formatting requirements when using the SummarizedExperiment class. I would try to make sure everything is as similar to the SummarizedExperiment object used in the vignette, since that one does work.

Also, please send me your session info so we can see if it's a version issue.

Thanks!

M-Arafat commented 6 months ago

@dariotommasini Thank you for your fast reply. I have been trying many times with other datasets trying to get the consensus module using multiWGCNA and WGCNA pkgs, the thing is when I increase the dimension of my data- to have more features- the error goes away both for multiWGCNA and WGCNA. Is there is any parameter to change or any way to manipulate the source code to accept low dimensional data either for multiWGCNA or WGCNA?

dariotommasini commented 6 months ago

How many features do you have? MultiWGCNA simply calls WGCNA blockwiseModules function so if it causes an error for WGCNA then multiWGCNA will fail too. And which error are you referring to?