Giter Club home page Giter Club logo

Comments (4)

littleju714 avatar littleju714 commented on September 18, 2024

I know how to fix the error 1:
chriscainx/mnnpy#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.

from scib-pipeline.

littleju714 avatar littleju714 commented on September 18, 2024

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.

from scib-pipeline.

mumichae avatar mumichae commented on September 18, 2024

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,
)

from scib-pipeline.

mumichae avatar mumichae commented on September 18, 2024

I changed the code so that you get NaN if the dataframe is empty. Feel free to update scib and rerun the pipeline.

from scib-pipeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.