lucapinello / CRISPResso

Software pipeline for the analysis of CRISPR-Cas9 genome editing outcomes from sequencing data
Other
131 stars 55 forks source link

ERROR: 'transform' must be an instance of 'matplotlib.transform.Transform' #6

Closed MLKaufman closed 7 years ago

MLKaufman commented 8 years ago

Hi Luca! In the latest version of matplotlib (1.5.1) they changed how Transform is called. I can no longer get your code to work. Here is the following error message:

CRITICAL @ Sun, 14 Aug 2016 20:37:38: Unexpected error, please check your input.

ERROR: 'transform' must be an instance of 'matplotlib.transform.Transform'

lucapinello commented 8 years ago

Hi Michael,

Thanks for reporting this, I have tried to update matplotlib to 1.5.1 in my machine (OSX) using anaconda 4.0.0 (python 2.7.11) but I cannot reproduce the error with CRISPResso 0.9.8.

Can you please try to update anaconda if you are using it and also check if the font cache is responsible (see here: http://stackoverflow.com/questions/38688881/seaborn-os-x-seaborn-pairplot-valueerror-transform-must-be-an-instance-of)

A work-around for now would be to create a virtualenv and stick to matplotlib 1.4.3, but I am really curios about this problem and see if we can solve it.

Thanks!

MLKaufman commented 8 years ago

So I tried many different things. Im on OSX El Capitan, running python and packages installed via homebrew and pip. I uninstalled seaborn. Uninstalled matplotlib and reinstalled with pip and homebrew. Deleted system cache. Deleted .matplotlib configs and font cache. Nothing has seemed to work.

The good news is that I tried it on another computer using the same setup I have before and everything worked. So for now I can run CRISPResso just fine. Still can't explain why it won't work on the first setup, however your virtualenv suggestion may be one work around. I suspect there may be some additional conflicting packages or some lingering problem from upgrading matplotlib so many times.

Thanks!

lucapinello commented 7 years ago

Thanks a lot for looking into this so carefully!

It is a bit of a mystery indeed. The only difference is that I use anaconda python and you are using the homebrew version. Do you think it may be related with this?

I will leave this issue opened until we understand how to reproduce this error.

lucapinello commented 7 years ago

Hi Micheal, the issue is still a mystery, but in the meantime I have created a Docker image for CRISPResso to have a version that is independent of the machine and particular libraries. I have update the doc to provide some example to run with Docker.

MLKaufman commented 7 years ago

Hey Luca, I think the issue is something related to my system but not homebrew. Other systems with the same homebrew setup work just fine. My theory is that there are some glitched matplotlib files that have file permissions that won't allow them to be corrected by a reinstallation. I can't seem to find them for a manual delete either. Tried the docker image this morning and it works great! Even on the system that CRISPResso would previously not work. Thanks so much for this alternative and for your work!

Michael

lucapinello commented 7 years ago

Thanks Michael, I will close this issue for now, if later you still have problems we can investigate this more. p.s. there is a new feature with the latest release, i.e. the full allelic frequency table, take a look to the file Alleles_frequency_table.txt in the output folder.

javadba commented 7 years ago

This issue continues to be present when using homebrew version of matplotlib.

lucapinello commented 7 years ago

Unfortunately I don't use homebrew and cannot reproduce the error. I don't think this is specific for CRISPResso since other packages have the exact same problem with homebrew: http://stackoverflow.com/questions/38688881/seaborn-os-x-seaborn-pairplot-valueerror-transform-must-be-an-instance-of

You may want to consider to use the Docker image provided or create a virtualenv with Anaconda Python.

javadba commented 7 years ago

Fair enough. Thx!