Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for bugs in barplotModuleEigenGene casued by sort and also a type… #135

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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