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

Animate MAGIC error #214

Open
JLTrincado opened this issue Nov 16, 2022 · 0 comments
Open

Animate MAGIC error #214

JLTrincado opened this issue Nov 16, 2022 · 0 comments
Labels

Comments

@JLTrincado
Copy link

Dear authors,

I'm using this amazing package in python (MAGIC version 3.0.0). When running animate_magic method, I encounter the following error:

magic.plot.animate_magic(data, gene_x='CXCR3', gene_y='IL2RB', operator=magic_op, t_max=12)

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<command-877177666815040> in <module>
      1 # make the font size bigger
      2 plt.rc('font', size=16)
----> 3 magic.plot.animate_magic(data, gene_x='CXCR3', gene_y='IL2RB', operator=magic_op, t_max=12)

/databricks/python/lib/python3.8/site-packages/magic/plot.py in animate_magic(data, gene_x, gene_y, gene_color, t_max, delay, operator, filename, ax, figsize, s, cmap, interval, dpi, ipython_html, verbose, **kwargs)
    129     data_magic = scprep.utils.toarray(data_magic)
    130     c = data_magic[gene_color] if gene_color is not None else None
--> 131     sc = ax.scatter(data_magic[gene_x], data_magic[gene_y], c=c, cmap=cmap)
    132     ax.set_title("t = 0")
    133     ax.set_xlabel(gene_x)

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

Is there any deprecation that could be affecting this method?

Thanks for your help,

Juanlu.

@JLTrincado JLTrincado added the bug label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant