Skip to content

Conversation

@gitbenlewis
Copy link
Contributor

fix for bugs in barplotModuleEigenGene casued by sort and also a type(colorBar) == dict line

@gitbenlewis
Copy link
Contributor Author

adding this code to the Quick_Start.ipynb will reproduce the error

import pandas as pd

read the metadata file and append sex to the Genotype column

metadata = pd.read_csv('./5xFAD_paper/sampleInfo.csv')
metadata['Genotype_sex'] = metadata['Genotype'] + metadata['Sex']
display(metadata.head())

save the metadata file

metadata.to_csv('./5xFAD_paper/sampleInfo2.csv', index=False)

#pyWGCNA_5xFAD.updateSampleInfo(path='5xFAD_paper/sampleInfo.csv', sep=',')
pyWGCNA_5xFAD.updateSampleInfo(path='5xFAD_paper/sampleInfo2.csv', sep=',')

add color for metadata

pyWGCNA_5xFAD.setMetadataColor('Sex', {'Female': 'green',
'Male': 'yellow'})
pyWGCNA_5xFAD.setMetadataColor('Genotype', {'5xFADWT': 'darkviolet',
'5xFADHEMI': 'deeppink'})
pyWGCNA_5xFAD.setMetadataColor('Age', {'4_mon': 'thistle',
'8mon': 'plum',
'12mon': 'violet',
'18mon': 'purple'})
pyWGCNA_5xFAD.setMetadataColor('Tissue', {'Hippocampus': 'red',
'Cortex': 'blue'})

pyWGCNA_5xFAD.setMetadataColor('Genotype_sex', {'5xFADWTFemale': 'darkviolet',
'5xFADHEMIFemale': 'deeppink',
'5xFADWTMale': 'forestgreen',
'5xFADHEMIMale': 'lime'})

output

@iron-lion
Copy link
Contributor

Hi,
I checked that sort patch can be issue with multiple metatables.

Here is my suggestion.
gitbenlewis#3

Best
YP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants