You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi,
The problem is that "adata.raw.X" is stored as a numpy array and not as a
sparse matrix.
I'm not sure the proper way to fix this in scanpy, but as a hack you can
just do "adata.raw.X = scipy.sparse.csc_matrix(adata.raw.X)
On Tue, Feb 18, 2020 at 9:20 PM sfortma2 ***@***.***> wrote:
Hi,
I am having an issue exporting my h5ad file to spring for visualization. I
have been following the spring export tutorial
<https://github.com/theislab/scanpy_usage/tree/master/171111_SPRING_export>
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
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=ABO45MQL5OZWPNVQ4DVA2HLRDSJPHA5CNFSM4KXQJUAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOP4S7Q>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABO45MT2NCBEDFOSJZMUHDLRDSJPHANCNFSM4KXQJUAA>
.
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:
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
The text was updated successfully, but these errors were encountered: