-
Notifications
You must be signed in to change notification settings - Fork 585
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
getting an error in scanpy after 'successfully' installing it through anaconda prompt #587
Comments
My operating system is windows 10. Appreciate all the help! |
Could you provide some version information on your conda environment? Pretty much the output of |
But also, that looks like an h5py issue. Do you still get the error if you try |
Hi! Thanks for the answer. Installing and importing h5py helped. I think I got scanpy to run. However, I am stuck again at reading the .mtx file Since I am new to scanpy I am just following your tutorial. I run the following comand and get the subsequent error bellow. adata = sc.read_10x_mtx(
'C:\\Users\\correap\\Documents\\03152019_scRNAseq\\filtered_feature_bc_matrix_1', # the directory with the `.mtx` file
var_names='gene_symbols', # use gene symbols for the variable names (variables-axis index)
cache=True) # write a cache file for faster subsequent reading ---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-17-e7dd3543f8df> in <module>()
2 'C:\\Users\\correap\\Documents\\03152019_scRNAseq\\filtered_feature_bc_matrix_1', # the directory with the `.mtx` file
3 var_names='gene_symbols', # use gene symbols for the variable names (variables-axis index)
----> 4 cache=True) # write a cache file for faster subsequent reading
5
6
~\AppData\Local\Continuum\anaconda3\lib\site-packages\scanpy\readwrite.py in read_10x_mtx(path, var_names, make_unique, cache, gex_only)
244 else:
245 adata = _read_v3_10x_mtx(path, var_names=var_names,
--> 246 make_unique=make_unique, cache=cache)
247 if not gex_only:
248 return adata
~\AppData\Local\Continuum\anaconda3\lib\site-packages\scanpy\readwrite.py in _read_v3_10x_mtx(path, var_names, make_unique, cache)
277 Read mex from output from Cell Ranger v3 or later versions
278 """
--> 279 adata = read(os.path.join(path, 'matrix.mtx.gz'), cache=cache).T # transpose the data
280 genes = pd.read_csv(os.path.join(path, 'features.tsv.gz'), header=None, sep='\t')
281 if var_names == 'gene_symbols':
~\AppData\Local\Continuum\anaconda3\lib\site-packages\scanpy\readwrite.py in read(filename, backed, sheet, ext, delimiter, first_column_names, backup_url, cache, **kwargs)
76 return _read(filename, backed=backed, sheet=sheet, ext=ext,
77 delimiter=delimiter, first_column_names=first_column_names,
---> 78 backup_url=backup_url, cache=cache, **kwargs)
79 # generate filename and read to dict
80 filekey = filename
~\AppData\Local\Continuum\anaconda3\lib\site-packages\scanpy\readwrite.py in _read(filename, backed, sheet, ext, delimiter, first_column_names, backup_url, cache, suppress_cache_warning, **kwargs)
447 else:
448 if not is_present:
--> 449 raise FileNotFoundError('Did not find file {}.'.format(filename))
450 logg.msg('reading', filename, v=4)
451 if not cache and not suppress_cache_warning:
FileNotFoundError: Did not find file C:\Users\correap\Documents\03152019_scRNAseq\filtered_feature_bc_matrix_1\matrix.mtx.gz. My filtered_feature_bc_matrix_1 contains the folders barcodes.tsv, gene_symbols.tsv (manually changed to this from default 10X output of genes) and the matrix.mtx file. I could manually change the matrix.mtx to matrix.mtx.gz. but this might corrupt the file and not be very good practice in the future. Any solutions to these different formats??? Also, if you could provide the ling to a manual or a documentation written for scanpy that would be great. |
Here's a link to the docs https://scanpy.readthedocs.io/, it's also available at the top of the github repo. EDIT: Whoops, posted some wrong info about how 10x pre v3 datasets are read before. |
I got through by importing a csv and reading it that way. Thanks for the link! |
I am still getting the file not found error because when downloading it's lacking the |
this is what i get after running
import scanpy as sc
The text was updated successfully, but these errors were encountered: