KrishnaswamyLab / MAGIC

MAGIC (Markov Affinity-based Graph Imputation of Cells), is a method for imputing missing values restoring structure of large biological datasets.
GNU General Public License v2.0
341 stars 97 forks source link

cannot import properly #33

Closed chenlingantelope closed 6 years ago

chenlingantelope commented 7 years ago

I installed magic on a mac, and if I try loading it in the magic directory, I get this error:

/usr/local/lib/python3.6/site-packages/matplotlib/init.py:1405: UserWarning: This call to matplotlib.use() has no effect because the backend has already been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time.

warnings.warn(_use_error_msg)

That still works.

If I try loading it in any other directory, I get an error:

Traceback (most recent call last): File "", line 1, in File "/Users/chenlingantelope/ResearchProjects/scRNA_simulation/magic.py", line 16, in scdata = magic.mg.SCData.from_csv(os.path.expanduser(rawcounts), AttributeError: module 'magic' has no attribute 'mg'

And I can run it in python environment but not at all from command line. Any suggestions?

pkathail commented 7 years ago

That first warning message has no effect, so you can just ignore it. As for the second error, do you mean that you can import magic and call functions from a python script but cannot launch the gui?

danieldager commented 6 years ago

Hi chenlingantelope,

There's a good chance that this problem was resolved with the release of MAGIC v1.0. Uninstall your current version of MAGIC and reinstall per the directions of the new README. I'm closing this for now; please feel free to open a new issue if you still have problems!

Best, Daniel