-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error reported in SEVtras.ESAI_calculator #8
Comments
This error may reason from that the data type of 'Stage2' in your cell matrix obs is not a |
I was also trying to reproduce this part of results, but I could not find the raw_feature_bc_matrix? Could any of you be kind to tell me where I can download these data? THANKS! |
Hi, I downloaded the raw data from the article [Single-cell transcriptome profiling of an adult human cell atlas of 15 major organs], and then ran CellRanger to get the raw_feature_bc_matrix. |
So you did it yourself using the sequencing data here (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE159929)? |
Thanks so much |
Thank you very much for your prompt reply. But I feel that there may be some bugs when I converted from Seurat to h5ad files, which caused various problems. I will try again and the results will be listed here. Thanks again |
This website provides some raw_feature_bc_matrix, I hope it will be helpful to you. |
Hello developer, I have solved the error problem and successfully ran SEVtras. The main problem is that when converting from Seurat to h5ad (refer to SeuratDisk ), some unknown errors will occur. When I follow the tutorial in this video to convert the format, it can run normally. Thanks again for your help! |
Thank you for your testing. I think it will be a great help for SEVtras. |
I am experiencing this same problem, thank you for the method you have provided |
Hello!! |
If you have to save filtered cell matrix from Seurat, I suggest that you set |
Thank you for your prompt response. The ESAI_calculator works now. |
Thanks for your advice. I will add this to the Troubleshooting list. |
Hi! I'm trying to use the ESAI_calculator function, and I encountered an error. /opt/conda/miniconda3/envs/SEVtras/lib/python3.7/site-packages/anndata/_core/anndata.py:1785: FutureWarning: X.dtype being converted to np.float32 from float64. In the next version of anndata (0.9) conversion will not be automatic. Pass dtype explicitly to avoid this warning.Pass
Since I'm working with a mouse dataset, I suspect the error might be due to the use of a human GMT file. As I'm a beginner in Python, and I haven't been able to identify where to replace the GMT file in the parameters or the source code of the ESAI_calculator function. Could you please advise me on how to use a mouse GMT file instead? Thank you! |
It seems to be true. I have only tested ESAI_calculator in human samples. This problem has been solved at v0.2.10. You can run ESAI_calculator with parameter |
Hi! After updating the package to version0.2.10, I still encounter an Error: [Errno 2] No such file or directory: '/.conda/envs/sevtras_env/lib/python3.7/site-packages/SEVtras/evsM.gmt' when running on mouse sample. Then I checked the path and there was indeed no such file, only an evs.gmt. Could you give me some suggestions to solve this problem? It would be appreciated for your reply. |
Thank you for your testing. The problem was fixed in v0.2.11. Could you please update to it and let me know if it is ok? |
Thank you for providing the solution, it runs well ! |
Hello, I currently want to reproduce the results in SEVtras using data from 15 normal tissues. When I was running the SEVtras.ESAI_calculator function, the following error occurred. I tried for a long time but could not solve it, so I am asking for your help.
/home/dell/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/anndata/_core/raw.py:146: FutureWarning: X.dtype being converted to np.float32 from float64. In the next version of anndata (0.9) conversion will not be automatic. Pass dtype explicitly to avoid this warning. Pass
AnnData(X, dtype=X.dtype, ...)to get the future behavour. uns=self._adata.uns.copy(), /home/dell/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/anndata/_core/anndata.py:1785: FutureWarning: X.dtype being converted to np.float32 from float64. In the next version of anndata (0.9) conversion will not be automatic. Pass dtype explicitly to avoid this warning. Pass
AnnData(X, dtype=X.dtype, ...)` to get the future behavour.[AnnData(sparse.csr_matrix(a.shape), obs=a.obs) for a in all_adatas],
/home/dell/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/anndata/_core/anndata.py:798: UserWarning:
AnnData expects .var.index to contain strings, but got values like:
[]
value_idx = self._prep_dim_index(value.index, attr)
AttributeError Traceback (most recent call last)
/tmp/ipykernel_19366/2460094773.py in
1 import SEVtras
----> 2 SEVtras.ESAI_calculator(adata_ev_path='./sEV_SEVtras.h5ad', adata_cell_path='../06.Seurat.15Tissue/pbmc.combined.v2.h5ad', out_path='./', Xraw=True, OBSsample='sample', OBScelltype='Stage2')
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/SEVtras/main.py in ESAI_calculator(adata_ev_path, adata_cell_path, out_path, OBSsample, OBScelltype, OBSev, OBSMpca, cellN, Xraw, normalW, plot_cmp, save_plot_prefix, OBSMumap, size)
185 adata_cell = read_adata(adata_cell_path, get_only=False)
186 from .functional import deconvolver, ESAI_celltype, plot_SEVumap, plot_ESAIumap
--> 187 celltype_e_number, adata_evS, adata_com = deconvolver(adata_ev, adata_cell, OBSsample, OBScelltype, OBSev, OBSMpca, cellN, Xraw, normalW)
188 ##ESAI for sample
189 sample_ESAI = (adata_com[adata_com.obs[OBScelltype]==OBSev,].obs[OBSsample].value_counts() / adata_com[adata_com.obs[OBScelltype]!=OBSev,].obs[OBSsample].value_counts()).fillna(0)
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/SEVtras/functional.py in deconvolver(adata_ev, adata_cell, OBSsample, OBScelltype, OBSev, OBSMpca, cellN, Xraw, normalW)
112 def deconvolver(adata_ev, adata_cell, OBSsample='batch', OBScelltype='celltype', OBSev='sEV', OBSMpca='X_pca', cellN=10, Xraw = True, normalW=True):
113
--> 114 adata_combined = preprocess_source(adata_ev, adata_cell, OBScelltype=OBScelltype, OBSev=OBSev, Xraw = Xraw)
115 gsea_pval_dat = source_biogenesis(adata_cell, OBScelltype=OBScelltype, Xraw = Xraw, normalW=normalW)
116 near_neighbor_dat = near_neighbor(adata_combined, OBSsample=OBSsample, OBSev=OBSev, OBScelltype=OBScelltype, OBSMpca=OBSMpca, cellN=cellN)
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/SEVtras/functional.py in preprocess_source(adata_ev, adata_cell, OBScelltype, OBSev, Xraw)
79
80 adata_combined.obs[OBScelltype] = pd.Categorical(adata_combined.obs[OBScelltype],
---> 81 categories = np.append(adata_cell_raw.obs[OBScelltype].cat.categories.values, OBSev), ordered = False)
82
83 adata_combined.raw = adata_combined
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/pandas/core/generic.py in getattr(self, name)
5485 ):
5486 return self[name]
-> 5487 return object.getattribute(self, name)
5488
5489 def setattr(self, name: str, value) -> None:
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/pandas/core/accessor.py in get(self, obj, cls)
179 # we're accessing the attribute of the class, i.e., Dataset.geo
180 return self._accessor
--> 181 accessor_obj = self._accessor(obj)
182 # Replace the property with the accessor object. Inspired by:
183 # https://www.pydanny.com/cached-property.html
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/pandas/core/arrays/categorical.py in init(self, data)
2599
2600 def init(self, data):
-> 2601 self._validate(data)
2602 self._parent = data.values
2603 self._index = data.index
~/anaconda3/envs/SEVtras_env/lib/python3.7/site-packages/pandas/core/arrays/categorical.py in _validate(data)
2608 def _validate(data):
2609 if not is_categorical_dtype(data.dtype):
-> 2610 raise AttributeError("Can only use .cat accessor with a 'category' dtype")
2611
2612 def _delegate_property_get(self, name):
AttributeError: Can only use .cat accessor with a 'category' dtype`
Below is my UMAP diagram
Looking forward to your reply.
Best wish
The text was updated successfully, but these errors were encountered: