Question about the parameter desiredInteractions in plot_cpdb2 fuction. #66
Unanswered
XiaoyuLi-smu
asked this question in
Q&A
Replies: 1 comment
-
try update |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ktplots version 1.2.3
When I ran the code in the vignette, I found a bug that really confused me. Here are the problems.
The results of the following code had no problem with the color of edges, but the width of one of the edges was wrong (KLRB1 from CD4T cell to CLEC2D of B cell).
library(ktplots)
data(kidneyimmune)
data(cpdb_output2)
p <- plot_cpdb2(cell_type1 = 'B cell', cell_type2 = 'CD4T cell',
scdata = kidneyimmune,
idents = 'celltype', # column name where the cell ids are located in the metadata
means = means2,
pvals = pvals2,
deconvoluted = decon2, # new options from here on specific to plot_cpdb2
desiredInteractions = list(
c('CD4T cell', 'B cell'),
c('B cell', 'CD4T cell')),
interaction_grouping = interaction_annotation,
edge_group_colors = c(
"Activating" = "#e15759",
"Chemotaxis" = "#59a14f",
"Inhibitory" = "#4e79a7",
"Intracellular trafficking" = "#9c755f",
"DC_development" = "#B07aa1",
"Unknown" = "#e7e7e7"
),
node_group_colors = c(
"CD4T cell" = "red",
"B cell" = "blue"),
keep_significant_only = TRUE,
standard_scale = TRUE,
remove_self = TRUE
)
p
As I thought that the imput for the parameter desiredInteractions (desiredInteractions = list(c('CD4T cell', 'B cell'), c('B cell', 'CD4T cell'))) was duplicted and changed it to desiredInteractions = list(c('B cell', 'CD4T cell')) or desiredInteractions = list( c(''CD4T cell', 'B cell')), the edge color in the result was wrong but the edge width was ok. For example the edge between CD22 and PTPRC should be blue (inhibitory). But the result was red (activating). It might be involved with the use of function geom_conn_bundle in the code of funciton plot_cpdb2.
Could anyone explain my questions? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions