Entering edit mode
18 months ago
yoshifumimiya
▴
50
I am using pyWGCNA to analyze 37 samples x 50000 genes.
I got the following error in analyseWGCNA().
What should I do? Please give me your opinion.
please read about reproducible examples (reprex) and then alter your post. E.g., here: https://reprex.tidyverse.org/
Thank you for your comment.
I apologize for the inadequacy of my question. I am having trouble understanding how to use "reprex" or "pyreprex". I am using Google colaboratory for python analysis. I have copied the more detailed code and output to Github and will attach it.
pyWGCNA question
Any valuable feedback from you would be greatly appreciated. Best regards.
Very nice!!! I will work on this at some time today when I have time. Until then, I can offer this:
the function that is throwing the error is not a part of the pyWGCNA package.
Instead,
pyWGCNA
callsSeaborn
, andSeaborn
callsmatplotlib
.Now, within matplotlib, a function in _base.py() calls
shrunk_to_aspect()
, which ultimately throws the error. The best way forward is to google that exact error message. Doing that will show you a couple threads of people having the same problem in different scenarios: Sometimes you can study those scenarios and find a workaround.Consider this thread. In their case,
geopandas
callsmatplotlib
, notseaborn
, but the solution could be the same or similar to your case.Will look more when have time.
Thanks for your response!!
I believe box_aspect is the cause of the error.
According to Google, the above code was added as a similar error countermeasure. However, since pyWGCNA is a library, it could not be incorporated from the outside.
Yes - I think it is, because the
fig_aspect
variable is set to 1 by default (transforms.py, line 522).That's true, BUT you could temporarily alter the the
shrunk_to_aspect()
function withintransforms.py
, or perhaps one of the functions in_base.py()
file within thematplotlib
package, by writing:you could the hardcode the
box_aspect
variable, for instance, then change it back afterwards.Thank you for your valuable input!!
I will try your suggestion.
This is definitely not one of the easier / quicker debugging problems you come across - it is pretty difficult.
please feel free to continue posting updates if you get stuck.
VAL
Yoshi - Were you able to figure this out?
Hi, VAL! I'm still trying to figure this out. Will be working on it this weekend.
I will report back with or without progress.
Your thoughts are correct.
I have rewritten the code in transforms.py but noticed that it is not reflected.
PyWGCNA_question_2
I am thinking of incorporating "box_aspect = 1" if there is a way to reflect this..,