Skip to content

density prior logic bug in map_cells_to_space #143

@brainfo

Description

@brainfo

https://github.com/broadinstitute/Tangram/blob/master/tangram/mapping_utils.py around line 287

    # define density_prior if 'rna_count_based' is passed to the density_prior argument:
    d_str = density_prior
    if type(density_prior) is np.ndarray:
        d_str = "customized"

    if density_prior == "rna_count_based":
        density_prior = adata_sp.obs["rna_count_based_density"]

    # define density_prior if 'uniform' is passed to the density_prior argument:
    elif density_prior == "uniform":
        density_prior = adata_sp.obs["uniform_density"]

apparently line 287 should also be elif,

    elif density_prior == "rna_count_based":

current if, will throw error when type(density_prior) is np.ndarray

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