Skip to content

Problem with using filter and normalization #2

Description

@Xueer-Zhang

Like in the example code, if I first perform a filter, like selecting the protein_coding gene, and then normalize it using raw_normalized_by_feature_length(), then the shape will not be broadcastable.

dX = dX.filter(explorer.make_filter(feature_types=["protein_coding"])

# common attributes are available such as tissues, assays, organism, disease, etc
tissues = dX.tissues

# .raw_normalized_by_feature_length gives you a numpy array
# .raw is also available (raw counts)
cells_by_types = [
    dX.filter(
        explorer.make_filter(
            max_cells=5_00,
            tissues=[tissue]
            )
    ).raw_normalized_by_feature_length
    for tissue in tissues
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions