-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I'm trying to figure out how to display cells with two conditions in two different colors. I don't think there are specific cell labels for each cell input into SPRING because only the X matrix and the gene list are used in the function make_spring_subplot. However, I suppose the indexes from 0 to the total number of cells can be used automatically as cell labels,
I guessed that the build_categ_colors function would be used to make the input for parameter cell_groupings. Then, cell_groupings was set to d_condition_labels as shown in the code below in make_spring_subplot. But the graph generated in SPRING is not what I want. So I don't think I set it up right. Can you help me to solve this problem? Thank you very much!
# test #0-5 indicate the cell label
# Dict d_condition_labels contains cell labels belonging to the corrsponding condition
d_condition_labels = {"Infected":['3','4','5'],"Control":['0','1','2']}
# Then I tested the function to check the structure of cell_groupings
build_categ_colors({},d_condition_labels)
{'Control': {'label_colors': {'0': '#00d4ff', '1': '#00007f', '2': '#ffe500'},
'label_list': ['0', '1', '2']},
'Infected': {'label_colors': {'3': '#00007f', '4': '#ffe500', '5': '#00d4ff'},
'label_list': ['3', '4', '5']}}
Metadata
Metadata
Assignees
Labels
No labels