Entering edit mode
4.3 years ago
ovariohisterectomia
▴
40
Hello, I'm new in RNA-Seq World, and im trying to export a network from WCGNA to Cytoscape, I'm trying this command (and the output is here too)
library(WGCNA);
library(cluster);
options(stringsAsFactors = FALSE);
load("modulePreservation.RData");
ADJ1=abs(cor(datExprhigado,use="p"))^6;
lnames = load(file = "modulePreservation.RData");
lnames;
[1] "mp"
TOM = TOMsimilarityFromExpr(datExprhigado, power = 18);
TOM calculation: adjacency..
..will use 4 parallel threads.
Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
annot = read.csv(file = "anotacionEG.csv");
modules = c("turquoise", "brown");
probes = names(datExprhigado);
inModule = is.finite(match(moduleColorsAutomatic, modules));
modProbes = probes[inModule];
modGenes = annot$gene_symbol[match(modProbes, annot$substanceBXH)];
modTOM = TOM[inModule, inModule];
dimnames(modTOM) = list(modProbes, modProbes);> library(WGCNA);
library(cluster);
options(stringsAsFactors = FALSE);
load("modulePreservation.RData");
ADJ1=abs(cor(datExprhigado,use="p"))^6;
lnames = load(file = "modulePreservation.RData");
lnames;
[1] "mp"
TOM = TOMsimilarityFromExpr(datExprhigado, power = 18);
TOM calculation: adjacency..
..will use 4 parallel threads.
Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
annot = read.csv(file = "anotacionEG.csv");
modules = c("turquoise", "brown");
probes = names(datExprhigado);
inModule = is.finite(match(moduleColorsAutomatic, modules));
modProbes = probes[inModule];
modGenes = annot$gene_symbol[match(modProbes, annot$substanceBXH)];
modTOM = TOM[inModule, inModule];
dimnames(modTOM) = list(modProbes, modProbes);
cyt = exportNetworkToCytoscape(modTOM,
edgeFile = paste("CytoscapeInput-edges-", paste(modules, collapse="-"), ".txt", sep=""),
nodeFile = paste("CytoscapeInput-nodes-", paste(modules, collapse="-"), ".txt", sep=""),
weighted = TRUE,
threshold = 0.02,
nodeNames = modProbes,
altNodeNames = modGenes,
nodeAttr = moduleColorsAutomatic[inModule])
Error in exportNetworkToCytoscape(modTOM, edgeFile = paste("CytoscapeInput-edges-", :
Cannot determine node names: nodeNames is NULL and adjMat has no dimnames.
It says basically that the objetc nodeNames do not have content..and the adjMat no not have dimnames. How may I solve it? is there anyway to correct this?
Thank you all!
What is the output of:
Also, can you confirm that all steps prior to
exportNetworkToCytoscape(...)
have completed successfully (really, confirm this)?Thank you kevin. Here says :
I think the error came from another line...i will write another answer. Thankyou!
hi everyone, i changed my script like this:
Then it outputs me txt files, in both i see the column AltName says n/a, then i saw this
so, i think the error is here
I have a doubt about what to write in "Name" and "gene_symbol" fields. I think that is the error.
in my dataExprhigado the head is this
and in the annotation file is:
So, to sum up, i think the error is that i do not know what do i have to type in the field Name and gene_symbol from this line:
Thank you again!
Now all resolved, or ... ?
Hi Kevin! Thank You for your help. Still not solved, because modGenes seems to be an empty file... thanks!
Difficult for me to debug from here. What is the output of
str(annot)
?hi again Kevin, and thank you for your patiente. I will tell you what i have done now. 1st of all my annotation file, was wrong, so i changed it (in the command line says the same name that before, but it is just a "practical" way, the file now is differente). I update what i do (and tell you too what str annot says
PART I
Script of module preservation and its output: HERE
Head of higadoData
Wcgna to Cytoscape script and output
PART II
Head of annot (this is the annotation file that i have changed . it is a new file, not a modifed one and the source is here [https://www.ncbi.nlm.nih.gov/genome/browse/#!/proteins/10706/50662%7CEchinococcus%20granulosus/][2] )
And finally, the str commands you asked me and its output
After all of this, i may get the .txt input files to cytoscape, BUT the column fromAltName and toAltName still says N/A, as you may see in this image:
![https://ibb.co/rmvyWLb][3]
Im not really sure what is happening, i thought the problema was that when i wrote "gene_symbol" ,as in the other messages i told you, because in the annot object there is no column called like this. But i tried changing to GeneID and to locus_tag and still is the same...
Thank you for you kindly help and patience!
No hay de que. Es aún difícil saber lo que está pasando. Pues / so, the issue is most likely here:
I think that it should be / debe ser:
...oppure: