Skip to content

[bat_int] hcla dataset cannot be processed #359

@KaiWaldrant

Description

@KaiWaldrant

Describe the bug
Processing the cellxgene dataset hcla with the batch integration dataset processor an error is raised:

Traceback (most recent call last):
  File "/tmp/nxf.DNtRDk7Ba7/.viash_script.sh", line 60, in
    adata_with_hvg = compute_batched_hvg(input, n_hvgs=par['hvgs'])
  File "/tmp/nxf.DNtRDk7Ba7/.viash_script.sh", line 49, in compute_batched_hvg
    hvg_list = scib.pp.hvg_batch(
  File "/usr/local/lib/python3.10/site-packages/scib/preprocessing.py", line 504, in hvg_batch
    sc.pp.highly_variable_genes(
  File "/usr/local/lib/python3.10/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 469, in highly_variable_genes
    hvg = _highly_variable_genes_single_batch(
  File "/usr/local/lib/python3.10/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 248, in _highly_variable_genes_single_batch
    df['mean_bin'] = pd.cut(
  File "/usr/local/lib/python3.10/site-packages/pandas/core/reshape/tile.py", line 293, in cut
    fac, bins = _bins_to_cuts(
  File "/usr/local/lib/python3.10/site-packages/pandas/core/reshape/tile.py", line 421, in _bins_to_cuts
    raise ValueError(
ValueError: Bin edges must be unique: array([      -inf, 0.00013226, 0.00014937, 0.00014937, 0.00016693,
       0.00016958, 0.00016958, 0.00018138, 0.0001983 , 0.0001983 ,
       0.00020949, 0.00020964, 0.00021124, 0.00030184, 0.00034767,
       0.00037922, 0.00048056, 0.00062685, 0.00096363, 0.007547  ,
              inf]).
You can drop duplicate edges by setting the 'duplicates' kwarg

https://tower.nf/orgs/openproblems-bio/workspaces/openproblems-bio/watch/4L4a4swu0PnnpT

To Reproduce
Steps to reproduce the behavior:

bash src/tasks/batch_integration/resources_scripts/process_datasets.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    batch_integrationrelates to task batch_integrationbugSomething isn't workingcellxgene_censusRelates to cellxgene_census dataset

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions