Closed littleju714 closed 2 years ago
I know how to fix the error 1: https://github.com/chriscainx/mnnpy/issues/30 I need to make the numba=0.45.0 and llvmlite 0.30.0, but it may be incompatible with others. So I give up mnn.
I have updated the metrics.py from the scib in github. And the error 2 becomes:
Traceback (most recent call last):
File "scripts/metrics/metrics.py", line 263, in <module>
trajectory_=trajectory_
File "/data/msun/miniconda3/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/scib/metrics/metrics.py", line 340, in metrics
verbose=False,
File "/data/msun/miniconda3/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/scib/metrics/silhouette.py", line 113, in silhouette_batch
sil_df = pd.concat(sil_dfs).reset_index(drop=True)
File "/data/msun/miniconda3/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 295, in concat
sort=sort,
File "/data/msun/miniconda3/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 342, in __init__
raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
But I don't know how to fix it.
Hi, it seems like you might not be getting any values for the batch silhouette (batch ASW) score. Could you check what the result of the metric is on the integrated output that is causing the error?
import scib
asw_batch = scib.me.silhouette_batch(
adata_int,
batch_key=batch_key,
group_key=label_key,
embed='X_emb',
return_all=True,
verbose=True,
)
If return_all
is True, you will get a Dataframe instead of an overall metric. I'm guessing it is empty in your case.
If 'X_emb' is not available, try computing and using the PCA instead
asw_batch = scib.me.silhouette_batch(
adata_int,
batch_key=batch_key,
group_key=label_key,
embed='X_pca',
return_all=True,
verbose=True,
)
I changed the code so that you get NaN if the dataframe is empty. Feel free to update scib and rerun the pipeline.
Hi! Thanks again for your excellent work!
I am running pipeline on my data, it has 4 study about myeloid cells from different labs. And their celltype are labeled based on different methods. For example, one study has celltype all as "myeloid cells", one as " TYPE1, TYPE2, TYPE3", one as" TAM1(PD-L1),TAM2".
I have get rid of "scanvi" and "scgen" methods in my config since they use celltype. But I keep the original celltype in the obs otherwise it will break in the embedding step. So can I still run the pipeline with my data?
It has the errors like : 1.
2.
And here is my config:
Could you help me with it? Does this error happen because of celltype issue or something else? Is it necessary to relabel their celltype?
Thank you for your time!!!!