Skip to content

Commit 57bf448

Browse files
committed
QC JSI: Removed row/column names if there are more than 20 samples
1 parent cd074f3 commit 57bf448

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

R/QCpanel.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ QCpanelServer <- function(id, expression.matrix, metadata, anno){
9292
metadata = meta,
9393
top.annotation.ids = match(input[['jaccard.annotations']], colnames(meta)),
9494
n.abundant = input[['jaccard.n.abundant']],
95-
show.values = input[["jaccard.show.values"]]
95+
show.values = input[["jaccard.show.values"]],
96+
show.row.columns.names = (nrow(meta) <= 20)
9697
)
9798
myplot
9899
})

R/QCplotFuns.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jaccard_heatmap <- function(
4242
metadata,
4343
top.annotation.ids = NULL,
4444
n.abundant = NULL,
45-
show.values = TRUE
45+
show.values = TRUE,
46+
show.row.columns.names = TRUE
4647
){
4748
n.abundant <- min(n.abundant, nrow(expression.matrix))
4849
n.samples <- ncol(expression.matrix)
@@ -54,7 +55,9 @@ jaccard_heatmap <- function(
5455
heatmat[i, j] <- heatmat[j, i] <- jaccard_index(i.gene.indices, j.gene.indices)
5556
}
5657
}
57-
rownames(heatmat) <- colnames(heatmat) <- colnames(expression.matrix)
58+
if(show.row.columns.names){
59+
rownames(heatmat) <- colnames(heatmat) <- colnames(expression.matrix)
60+
}
5861

5962
if(!is.null(top.annotation.ids)){
6063
qual.col.pals = dplyr::filter(RColorBrewer::brewer.pal.info, .data$category == 'qual')

0 commit comments

Comments
 (0)