Query regarding WGCNA module formation
0
0
Entering edit mode
abhisek001 • 0
@6d5973d2
Last seen 3 months ago
India

I am trying to make a co-expression module with the following input gene-set associated standard division into a csv file and R-code but I'm getting error at the point of creating similarity matrix-

Geneid Standard_Deviation

TEA_015735 136871.105296187

TEA_021485 90055.8355925799

TEA_008699 52986.1997835285

TEA_006622 52363.8854613665

TEA_024055 46407.075185256

TEA_020597 33511.1751584453

TEA_028572 29998.4692072409

TEA_001699 27893.7930167468

TEA_001579 25183.9331177197

workingData = read.csv("gene_count_matrix _sd.csv", header = T, row.names =1)

cordist <- function(dat) { cor_matrix <- cor(t(dat))

dist_matrix <- as.matrix(dist(dat, diag=TRUE, upper=TRUE)) dist_matrix <- log1p(dist_matrix) dist_matrix <- 1 - (dist_matrix / max(dist_matrix))

sign(cor_matrix) * ((abs(cor_matrix) + dist_matrix)/ 2) }

sim_matrix <- cordist(workingData)

Error is following in R studio -

Error in cor(t(dat)) : 'x' has a zero dimension.

For reference, I Have installed the following libraries in R studio- WGCNA, knitr, reshape2, limma, gplots, ggplot2, RColorBrewer

WGCNA RNAseq RNASeqData • 677 views
ADD COMMENT
0
Entering edit mode

The cordist function fails on the first step. What is the dimensions of workingData: dim(workingData) ?

ADD REPLY

Login before adding your answer.

Traffic: 790 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6