cytoscape 输入数据
my_modules <- c("red")i = paste(my_modules, collapse = "_")# paste(c("red", "black", "green"), collapse = "_")# #> [1] "red_black_green"m_wgcna_result <- wgcna_result %>% filter(module %in% my_modules)m_datExpr <- datExpr[, m_wgcna_result$gene_id]# 计算该模块的 TOM 矩阵 m_TOM <- TOMsimilarityFromExpr( m_datExpr, power = sft$powerEstimate, networkType = "unsigned", TOMType = "unsigned")dimnames(m_TOM) <- list(colnames(m_datExpr), colnames(m_datExpr))edge <- paste("CytoscapeInput-network.", i, ".txt", sep = "")node <- paste("CytoscapeInput-node.", i, ".txt", sep = "")# 导出 Cytoscape 输入文件cyt <- exportNetworkToCytoscape( m_TOM, edgeFile = edge, nodeFile = node, weighted = TRUE, threshold = 0.1)