Skip to content

Commit

Permalink
revert to original behaviour (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
zktuong authored Feb 15, 2024
1 parent 7a4ca0c commit 54b8a69
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions R/plot_cpdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ plot_cpdb <- function(scdata, cell_type1, cell_type2, celltype_key, means, pvals
}
means_mat <- .prep_table(means)
pvals_mat <- .prep_table(pvals)
missing_cols <- c()
for (col in colnames(means_mat)) {
if (!(col %in% colnames(pvals_mat))) {
missing_cols <- c(missing_cols, col)
}
}
if (length(missing_cols) > 0) {
epty <- matrix(1, nrow = nrow(pvals_mat), ncol = length(missing_cols))
colnames(epty) <- missing_cols
missing_df <- as.data.frame(epty)
rownames(missing_df) <- rownames(pvals_mat)
pvals_mat <- cbind(pvals_mat, missing_df)
}
if (!is.null(interaction_scores)) {
interaction_scores_mat <- .prep_table(interaction_scores)
} else if (!is.null(cellsign)) {
Expand Down

0 comments on commit 54b8a69

Please sign in to comment.