From 54b8a69fda21583003f1f51a38f33883b4acce98 Mon Sep 17 00:00:00 2001 From: Zewen Kelvin Tuong Date: Thu, 15 Feb 2024 12:12:15 +1000 Subject: [PATCH] revert to original behaviour (#100) --- R/plot_cpdb.R | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/R/plot_cpdb.R b/R/plot_cpdb.R index 9d1e4e7..f16de78 100644 --- a/R/plot_cpdb.R +++ b/R/plot_cpdb.R @@ -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)) {