Hello,
I am trying to make export files from WGCNA
to Cytoscape
for network analysis. I have 40 traits. WGCNA analysis identified 57 modules. I want to make a network figure using Cytoscape for all the traits how they are connected. I tried following code in HPC
:
lnames = load(file = "dataInput.RData");
lnames=load(file = "SignedHybrid-networkConstruction-auto.RData");
softPower <- 7 ;
adjacency <- adjacency(datExpr, power = softPower) ;
TOM <- TOMsimilarity(adjacency) ;
modules = c("bisque4","black","blue","blue2","coral1","coral2","cyan","darkgrey","darkmagenta","darkred","darkseagreen4","darkslateblue","darkturquoise","darkviolet","firebrick4","green","greenyellow","grey","grey60","honeydew1","indianred4","ivory","lavendarblush3","lightcoral","lightcyan1","lightgreen","lightpink4","magenta","maroon","mediumorchid","mediumpurple2","mediumpurple3","navajowhite2","orangered4","palevioletred3","pink","plum1","plum2","plum3","purple","red","royalblue","salmon2","salmon4","skyblue","skyblue1","skyblue3","tan","thistle1 ","thistle2 ","thistle3","turquoise","violet","violetred","white","yellow","yellow4")
probes = colnames(datExpr)
inModule = is.finite(match(moduleColors, modules));
modProbes = probes[inModule];
modTOM = TOM[inModule, inModule];
dimnames(modTOM) = list(modProbes, modProbes)
cyt = exportNetworkToCytoscape(modTOM,
edgeFile = paste("CytoscapeInput-edges0-", paste(modules, collapse="-"), ".txt", sep=""),
nodeFile = paste("CytoscapeInput-nodes0-", paste(modules, collapse="-"), ".txt", sep=""),
weighted = TRUE,
threshold = 0,
nodeNames = modProbes,
nodeAttr = moduleColors[inModule]);
But it gives error:
/apps/R/3.6/bin/launch_r: line 3: 3725 Killed singularity exec -B /apps,/opt/slurm,/var/run/munge:/run/munge "${HPC_SINGULARITY_IMAGE}" "$@"
Thank you! Yes, it is on cluster. I do not have a log but the script was aborted at the last step to create
cyt
.Thank you! Yes, it is on cluster. I do not have a log but the script was aborted at the last step to create
cyt
.Well, you probably need to request more memory when you schedule the job. Check the number of genes that match the criteria you have for selection. Keep in mind that the necessary memory scales as the number of genes squared because the data for cytoscape is essentially a data frame where each row corresponds to a connection. If you have 10k genes, you have 100M connections (rows), or several character and numeric vectors of length 100M. That can easily take multiple gigabytes of memory.
I see. Thank you for the detailed explanation!
It is a duplicate comment.........
Thank you......................