This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("tidyverse") | |
library("ggrepel") | |
library("mclust") | |
library("mcp") | |
library("segmented") | |
library("splines") | |
find_segments <- function( | |
response, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just download it and `source rlang_okabeito_theme.R` to get your plots looking FAB-U-LOUS. | |
ggplot2::theme_set( | |
ggplot2::theme_bw() + | |
ggplot2::theme( | |
strip.background = element_rect( | |
color="black", fill="white", linewidth=0, linetype="solid" | |
), | |
rect = element_rect( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is code to perform consensus clustering from a set of clusters from e.g. leiden clustering | |
# https://www.biorxiv.org/content/biorxiv/early/2022/10/11/2022.10.09.511493.full.pdf | |
# The basic use is as follows | |
# | |
#P1 <- factor(c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4)) | |
#P2 <- factor(c(1, 1, 2, 1, 2, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4)) | |
#P3 <- factor(c(1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 3, 4, 4)) | |
# | |
#clustering_sets <- list("P1" = P1, "P2" = P2, "P3" = P3) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.