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

Export to spring issue (AttributeError: 'numpy.ndarray' object has no attribute 'tocsc') #19

Open
sfortma2 opened this issue Feb 19, 2020 · 1 comment

Comments

@sfortma2
Copy link

Hi,

I am having an issue exporting my h5ad file to spring for visualization. I have been following the spring export tutorial but every time I try to run sc.export_to.spring_project I get the following error:

sc.export_to.spring_project(adata1, '/home/seth/anaconda3/write', 'draw_graph')
Writing subplot to /home/seth/anaconda3
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-9-656bbf38658a> in <module>
----> 1 sc.export_to.spring_project(adata1, '/home/seth/anaconda3/write', 'draw_graph', cell_groupings='louvain_r0.8_sub')

~/anaconda3/envs/ddocent_env/lib/python3.7/site-packages/scanpy/_exporting.py in spring_project(adata, project_dir, embedding_method, subplot_name, cell_groupings, custom_color_tracks, total_counts_key, overwrite)
    101     # Ideally, all genes will be written from adata.raw
    102     if adata.raw is not None:
--> 103         E = adata.raw.X.tocsc()
    104         gene_list = list(adata.raw.var_names)
    105     else:

AttributeError: 'numpy.ndarray' object has no attribute 'tocsc'

I can't seem to get around this error. I tried posting in the scanpy github page but received no responses. Any help would be greatly appreciated!

Thanks,
Seth

@calebweinreb
Copy link
Collaborator

calebweinreb commented Feb 20, 2020 via email

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

No branches or pull requests

2 participants