Comments (5)
Hi,
please make sure you have the latest version and if you still got that error would you mind sharing with me your picke file and the script you used?
from pywgcna.
Hi,
please make sure you have the latest version and if you still got that error would you mind sharing with me your picke file and the script you used?
Hi
I have installed pYWGCNA1.2.3. Previous error have solved.
The data link mentioned in #39 (comment)
Thank you so much
from pywgcna.
Hi,
For pywgcna.analyseWGCNA()
, you need to add your data trait and colormap like the tutorials.
I don't have your data trait and the script you used. would you mind giving me some insight of those things?
Thanks
from pywgcna.
Hi, thanks for response
the trait data was arranged like tutorials. a dataframe like this:
sample_id group
oocyte1 oocyte
oocyte2 oocyte
oocyte3 oocyte
pronuclear1 pronuclear
pronuclear2 pronuclear
pronuclear3 pronuclear
zygote1 zygote
zygote2 zygote
2_cell1 2_cell
2_cell2 2_cell
2_cell3 2_cell
4_cell1 4_cell
4_cell2 4_cell
4_cell3 4_cell
4_cell4 4_cell
8_cell1 8_cell
8_cell2 8_cell
8_cell3 8_cell
8_cell4 8_cell
8_cell5 8_cell
8_cell6 8_cell
8_cell7 8_cell
8_cell8 8_cell
8_cell9 8_cell
8_cell10 8_cell
8_cell11 8_cell
morula1 morula
morula2 morula
morula3 morula
The color set was copy from the tutorials.
test.setMetadataColor('stage', ['oocyte': 'darkviolet',
'pronuclear': 'deeppink',
'zygote': 'thistle',
'2cell': 'plum',
'4cell': 'violet',
'8cell': 'purple',
'morula':'red'])
Thank you
from pywgcna.
Again, I was able to run PyWGNA without any problem!
I attached my script below.
Please read the tutorials more carefully :)
i.e. your color map should be a dictionary, not a list. Or the name of the color map should match to the one the column names but in your case, your column name is group
but you specify stage
in the setMetadataColor()
function.
import PyWGCNA
import pandas as pd
tpm = pd.read_csv('GSE44183_human_expression_mat.txt', sep='\t', index_col=0).T
test = PyWGCNA.WGCNA(name='test',
species='mus musculus',
geneExp=tpm,
outputPath='',
save=True)
test.preprocess()
test.findModules()
sampleInfo = test.datExpr.obs.copy(deep=True)
sampleInfo['group'] = sampleInfo.index.tolist()
sampleInfo.group[sampleInfo.group.str.contains('oocyte')] = 'oocyte'
sampleInfo.group[sampleInfo.group.str.contains('pronuclear')] = 'pronuclear'
sampleInfo.group[sampleInfo.group.str.contains('zygote')] = 'zygote'
sampleInfo.group[sampleInfo.group.str.contains('2 cell')] = '2 cell'
sampleInfo.group[sampleInfo.group.str.contains('4 cell')] = '4 cell'
sampleInfo.group[sampleInfo.group.str.contains('8 cell')] = '8 cell'
sampleInfo.group[sampleInfo.group.str.contains('morula')] = 'morula'
test.updateSampleInfo(sampleInfo=sampleInfo)
test.setMetadataColor('group', {'oocyte': 'darkviolet',
'pronuclear': 'deeppink',
'zygote': 'thistle',
'2 cell': 'plum',
'4 cell': 'violet',
'8 cell': 'purple',
'morula':'red'})
test.analyseWGCNA()
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
- ask for some questions HOT 3
- Image too large. How suppress drawing when using pyWGCNA_obj.preprocess() ? HOT 3
- RecursionError when run pyWGCNA_ct.preprocess() HOT 1
- getDatTraits method might not be suitable for continuous traits. HOT 1
- How adjust parameter in functions??
- Genes and samples switched in goodSamplesGenes HOT 3
- 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.