Skip to content

use_cell_types = False is not working correctly. #62

@nbnbhwyy

Description

@nbnbhwyy

Thank you for your excellent work. I'm trying to run Spectra_Colaboratory_tutorial. I found that for spc_tl.check_gene_set_dictionary,

when I set use_cell_types to false... The model is reporting the following errors:

"Cell type labels in gene set annotation dictionary and AnnData object are identical."
"Removing gene set B_GC for cell type global which is of length 0 0 genes are found in the data. Minimum length is 3."
"Removing gene set B_memory for cell type global which is of length 4 0 genes are found in the data. Minimum length is 3."

I found that when I set use_cell_types to false, check_gene_set_dictionary directly overwrites the current annotations with the global keyword (annotations = {global_key: annotations}), which causes:

annotations_new = {}
for k, v in annotations.items():
annotations_new[k] = {}
for k2, v2 in v.items():

The scan cannot enter the gene layer because it is nested one more layer than the use_cell_types = True dictionary." My understanding is that when use_cell_types is set to false, the global gene set is used. Therefore, shouldn't we first set annotations = {"global": annotations["global"]} to ensure the gene set is correctly scanned? Finally, return the complete annotations_new to preserve the global keyword.

Furthermore, I'd like to ask if it's possible to completely independent of the defined gene set, allowing the model to explore and generate all factors itself (adata.uns['SPECTRA_factors'])? The article seems to mention dependency control on the gene set; which parameter primarily affects this? Is it feasible to obtain factors independently of the prior gene set? Have you tried this? I hope to receive your help.

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