Skip to content

n_bins not respected in highly_variable_genes(..., flavour='cell_ranger') #888

Open
@flying-sheep

Description

@flying-sheep

This code creates the range [10, 15, …, 100], which is 19 values. Taking those percentiles together with -inf and +inf creates 20 bins (from 21 bin borders), understood.

https://github.com/theislab/scanpy/blob/e6e08e51d63c78581bb9c86fe6e302b80baef623/scanpy/preprocessing/_highly_variable_genes.py#L90

But 1. why start at 10% and 2. why is n_bins ignored and there are always 20 bins created?

@Koncopd @falexwolf you introduced this in #330, is this what cellranger does?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions