-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Some samples may only have a subset of cell types. For example, c.names has 5 levels but cluster has 4 distinct numeric values.
Browse[2]> celltype <- as.factor(alldata$celltype[alldata$sample == x]) # Code from helper_CCI in helper_CCI.R
Browse[2]> table(celltype)
celltype
dCAF iCAF mCAF tpCAF vCAF
202 492 242 737 0
Browse[2]> celltype_numeric <- as.numeric(celltype) # Code from helper_CCI in helper_CCI.R
Browse[2]> table(celltype_numeric)
celltype_numeric
1 2 3 4
202 492 242 737
Browse[2]> signal <- cell_signaling(data = data_dataframe, genes = rownames(data_dataframe), cluster = celltype_numeric,
c.names = levels(celltype), write = FALSE) # Code from helper_CCI in helper_CCI.R
Error in SingleCellSignalR::cell_signaling(data = data_dataframe, genes = rownames(data_dataframe), :
The length of c.names must be equal to the number of clusters and must contain no duplicates.scFeatures should gracefully drop empty factor levels like aFactor <- droplevels(aFactor) before cell_signaling function call.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels