Skip to content

Commit

Permalink
Merge pull request #53 from omnideconv/alex_dev
Browse files Browse the repository at this point in the history
bugfix for signature heatmap
  • Loading branch information
czackl authored Dec 1, 2023
2 parents 97576ad + 934e13b commit ec0d8f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/SignatureExplorationPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ plot_signatureClustered <- function(signature_mat,

# calc mean and sd
df$mean <- rowMeans(df[, -1])
df$sd <- apply(df[, 2:(ncol(df) - 1)], 1, sd)
df$sd <- apply(df[, 2:(ncol(df) - 1)], 1, sd) + 0.0001 # add pseudocount to not divide by 0 in case of SD=0

# pivot for z-score calc
df <- tidyr::pivot_longer(df, !c("X", "mean", "sd"), names_to = "cell_type", values_to = "value")
Expand Down

0 comments on commit ec0d8f1

Please sign in to comment.