Comments (6)
I encountered the same problem and found the solution here:
WestHealth/pyvis#223
from pywgcna.
Hi,
would you mind sending the full error?
from pywgcna.
/Users/mksingh/PyWGCNA/figures/network/all.html
Traceback (most recent call last):
File "/Users/mksingh/PyWGCNA/network.py", line 10, in
pyWGCNA_m1_10x.CoexpressionModulePlot(modules=modules, numGenes=10, numConnections=100, minTOM=0, file_name="all")
File "/Users/mksingh/anaconda3/lib/python3.10/site-packages/PyWGCNA/wgcna.py", line 3391, in CoexpressionModulePlot
net.show(f"{self.outputPath}/figures/network/{file_name}.html")
File "/Users/mksingh/anaconda3/lib/python3.10/site-packages/pyvis/network.py", line 546, in show
self.write_html(name, open_browser=False,notebook=True)
File "/Users/mksingh/anaconda3/lib/python3.10/site-packages/pyvis/network.py", line 515, in write_html
self.html = self.generate_html(notebook=notebook)
File "/Users/mksingh/anaconda3/lib/python3.10/site-packages/pyvis/network.py", line 479, in generate_html
self.html = template.render(height=height,
AttributeError: 'NoneType' object has no attribute 'render'
from pywgcna.
can you send me your pickle file?
from pywgcna.
I am attaching all the input files as pickle file is large in size.
sample_info.csv
trimmed_means_transposed.csv
Running script:
import PyWGCNA
geneExp = 'trimmed_means_transposed.csv'
pyWGCNA_m1_10x = PyWGCNA.WGCNA(name='m1_10x', species='human', geneExpPath=geneExp, outputPath='/Users/manojkumarsingh/PyWGCNA_', save=True)
print( pyWGCNA_m1_10x.geneExpr.to_df().head(5) )
pyWGCNA_m1_10x.preprocess()
pyWGCNA_m1_10x.findModules()
pyWGCNA_m1_10x.updateSampleInfo(path='/Users/manojkumarsingh/PyWGCNA_/sample_info.csv', sep=',')
pyWGCNA_m1_10x.setMetadataColor('Sex', {'F': 'green',
'M': 'yellow'})
pyWGCNA_m1_10x.setMetadataColor('Genotype', {'Nothing': 'darkviolet',
'Something': 'deeppink'})
pyWGCNA_m1_10x.setMetadataColor('Age', {'0': 'thistle',
'1': 'purple'})
pyWGCNA_m1_10x.setMetadataColor('Tissue', {'M1': 'red',
'Cortex': 'blue'})
geneList = PyWGCNA.getGeneList(dataset='hsapiens_gene_ensembl', attributes=['ensembl_gene_id', 'external_gene_name', 'gene_biotype'], maps=['gene_id', 'gene_name', 'gene_biotype'])
pyWGCNA_m1_10x.updateGeneInfo(geneList)
pyWGCNA_m1_10x.analyseWGCNA()
pyWGCNA_m1_10x.saveWGCNA()
import PyWGCNA
pyWGCNA_m1_10x = PyWGCNA.readWGCNA("m1_10x.p")
print(pyWGCNA_m1_10x.datExpr.var.head(5) )
pyWGCNA_m1_10x.CoexpressionModulePlot(modules=["silver"], numGenes=10, numConnections=100, minTOM=0)
modules = pyWGCNA_m1_10x.datExpr.var.moduleColors.unique().tolist()
print( modules )
pyWGCNA_m1_10x.CoexpressionModulePlot(modules=modules, numGenes=10, numConnections=100, minTOM=0, file_name="all")
from pywgcna.
Hi,
I was able to run your code without any problem and gave me what it suppose to give! The only thing I changed is the outputPath which I don't believe is related to the error you got!
I would check the version of packages you have. I have listed mine here
for example this is what I got for silver module
from pywgcna.
Related Issues (20)
- how to set figsize HOT 2
- SystemExit: All your genes ended up in one modules! Reconsider your input parameters in order to get more modules. HOT 6
- module_trait_relationships_heatmap HOT 4
- Pandas error HOT 4
- Visualization error HOT 6
- Tutorial data
- gene name question HOT 1
- analyseWGCNA subplot error HOT 11
- Error with Bubble plot when comparing WGCNA objects HOT 3
- Error during "plotting module heatmap eigengene..." step of WGNCA.analyseWGCNA() HOT 1
- error experienced in tutorial HOT 6
- Doubt on application HOT 1
- What other methods to define metadata colors are allowed, besides color labels ('black', 'pink', etc)? HOT 1
- Seeking help on `order` Parameter Usage and Metadata Color Settings HOT 13
- a issue for findModules() HOT 3
- findModules() inappropriately passes all kwargs to pickSoftThreshold() and cuttreeHybrid() HOT 2
- Re-naming modules HOT 1
- In the module Network Plot, Can we label the node as gene_name instead of gene_id ? HOT 2
- Several errors when performing findModules steps individually HOT 8
- 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywgcna.