Upload log
Jump to navigation
Jump to search
Below is a list of the most recent file uploads. See the gallery of new files for a more visual overview.
- 16:37, 31 January 2025 Brb talk contribs uploaded File:Heatmapcolparam.png (<syntaxhighlight lang='r'> library(ComplexHeatmap) library(circlize) # Create a sample 5x5 matrix with values from -4 to 4 set.seed(123) # for reproducibility example_matrix <- matrix(runif(25, -4, 4), nrow = 5) colnames(example_matrix) <- paste0("Col", 1:5) rownames(example_matrix) <- paste0("Row", 1:5) # Define the color function that truncates at -2 and 2 col_fun <- colorRamp2(c(-2, 0, 2), c("blue", "white", "red")) # Plot the heatmap without truncating the data heatmap1 <- Heatmap(exa...)
- 18:37, 11 January 2025 Brb talk contribs uploaded a new version of File:Scale color identity.png
- 18:33, 11 January 2025 Brb talk contribs uploaded File:Scale color identity.png (<syntaxhighlight lang='r'> library(ggplot2) library(patchwork) # Data for the plots data <- data.frame( x = 1:3, y = c(5, 10, 15), color = c("#FF0000", "#00FF00", "#0000FF") # Actual color codes ) # Plot 1: Without scale_color_identity() plot1 <- ggplot(data, aes(x = x, y = y, color = color)) + geom_point(size = 5) + ggtitle("Without scale_color_identity()") # Plot 2: With scale_color_identity() plot2 <- ggplot(data, aes(x = x, y = y, color = color)) + geom_point(size = 5) +...)
- 20:27, 26 December 2024 Brb talk contribs uploaded a new version of File:Hmscaled.png
- 20:21, 26 December 2024 Brb talk contribs uploaded File:Hmscaled2.png (<syntaxhighlight lang='r'> x <- structure(c(16.9966943817533, 17.9931011170293, 17.5792623673341, 18.5768638712856, 15.6183559348761, 18.605802884533, 17.9288112453195, 18.4134150861349, 17.6070787425032, 17.8698729193728, 17.7444512372316, 18.092093724098, 16.9949257540877, 17.7299728705232, 18.2145767113386, 18.5766893731416), dim = c(4L, 4L), dimnames = list(c("Gene1", "Gene2", "Gene3", "Gene4"), c("Sample1", "Sample2", "Sample3","Sample4"))) scaled_x <- t(sca...)
- 20:20, 26 December 2024 Brb talk contribs uploaded File:Hmx2.png (<syntaxhighlight lang='r'> x <- structure(c(16.9966943817533, 17.9931011170293, 17.5792623673341, 18.5768638712856, 15.6183559348761, 18.605802884533, 17.9288112453195, 18.4134150861349, 17.6070787425032, 17.8698729193728, 17.7444512372316, 18.092093724098, 16.9949257540877, 17.7299728705232, 18.2145767113386, 18.5766893731416), dim = c(4L, 4L), dimnames = list(c("Gene1", "Gene2", "Gene3", "Gene4"), c("Sample1", "Sample2", "Sample3","Sample4"))) row_hc <- hclust(...)
- 20:11, 26 December 2024 Brb talk contribs uploaded a new version of File:Statsheatmap.png
- 22:00, 25 December 2024 Brb talk contribs uploaded File:Opi-llm2.png
- 22:00, 25 December 2024 Brb talk contribs uploaded File:Opi-llm.png
- 16:45, 23 December 2024 Brb talk contribs uploaded File:Statsheatmapscaled.png
- 16:45, 23 December 2024 Brb talk contribs uploaded File:Statsheatmap.png
- 15:58, 23 December 2024 Brb talk contribs uploaded File:Hmscaled.png
- 15:58, 23 December 2024 Brb talk contribs uploaded File:Hmx.png
- 22:05, 21 December 2024 Brb talk contribs uploaded File:Rscales2.png
- 22:02, 21 December 2024 Brb talk contribs uploaded File:Rscales.svg (<pre> svglite("~/Downloads/Rscales2.svg", bg = "transparent") par(mfrow = c(1, 3),mar = c(0, 4, 0, 2)) show_col(hue_pal()(4)) show_col(hue_pal()(3)) show_col(hue_pal()(2)) par(mfrow = c(1, 1)) dev.off() </pre>)
- 20:06, 24 August 2024 Brb talk contribs uploaded File:R-squared.png
- 14:54, 13 August 2024 Brb talk contribs uploaded File:Geom bar reorder.png (<syntaxhighlight lang='r'> library(ggplot2) library(forcats) data <- data.frame( category = c("A", "B", "C", "D"), value = c(3, 5, 2, 8) ) data$category <- fct_reorder(data$category, data$value) levels(data$category) # [1] "C" "A" "B" "D" ggplot(data, aes(x = category, y = value, fill = category)) + geom_bar(stat = "identity") + coord_flip() + labs(x = "Category", y = "Value") + theme_minimal() </syntaxhighlight>)
- 14:47, 13 August 2024 Brb talk contribs uploaded File:Geom bar simple.png (<syntaxhighlight lang='r'> library(ggplot2) data <- data.frame( category = c("A", "B", "C", "D"), value = c(3, 5, 2, 8) ) ggplot(data, aes(x = category, y = value, fill = category)) + geom_bar(stat = "identity") + coord_flip() + labs(x = "Category", y = "Value") + # scale_fill_manual(values = c("A" = "red", "B" = "blue", "C" = "green", "D" = "purple")) theme_minimal() </syntaxhighlight>)
- 12:44, 12 August 2024 Brb talk contribs uploaded File:Nomogram.png
- 14:56, 15 July 2024 Brb talk contribs uploaded File:GfortranMac.png
- 07:24, 22 June 2024 Brb talk contribs uploaded File:Verizonont.jpg
- 12:38, 14 June 2024 Brb talk contribs uploaded File:CredoError.png
- 13:31, 8 June 2024 Brb talk contribs uploaded File:Add camera.png
- 14:12, 27 May 2024 Brb talk contribs uploaded File:Gganimation.gif (<syntaxhighlight lang='r'> library(gganimate) library(ggplot2) library(tidyverse) library(ggimage) data_link <- "https://raw.githubusercontent.com/goodekat/presentations/master/2019-isugg-gganimate-spooky/bat-data/bats-subset.csv" bats <- read.csv(data_link) %>% mutate(id = factor(id)) bat_image_link <- "https://upload.wikimedia.org/wikipedia/en/a/a9/MarioNSMBUDeluxe.png" animation <- bats %>% mutate(image = bat_image_link) %>% filter(id == 1) %>% ggplot(aes(x = longitude, y = la...)
- 08:58, 23 May 2024 Brb talk contribs uploaded File:Pca ggplot2.png (<syntaxhighlight lang='r'> df <- iris[, 1:4] # exclude "Species" column pca_res <- prcomp(df, scale = TRUE) ggplot(iris, aes(x = pca_res$x[,1], y = pca_res$x[,2], color = Species)) + geom_point() + stat_ellipse() </syntaxhighlight>)
- 14:18, 8 May 2024 Brb talk contribs uploaded File:Rtools44.png
- 16:31, 23 April 2024 Brb talk contribs uploaded File:Polygon.png (<syntaxhighlight lang='r'> plot(c(1, 9), 1:2, type = "n") polygon(1:9, c(2,1,2,1,NA,2,1,2,1), col = c("red", "blue"), border = c("green", "yellow"), lwd = 3, lty = c("dashed", "solid")) </syntaxhighlight>)
- 13:49, 23 April 2024 Brb talk contribs uploaded File:Venn4.png (<syntaxhighlight lang='r'> library(venn) set.seed(12345) x <- list(First = 1:40, Second = 15:60, Third = sample(25:50, 25), Fourth=sample(15:65, 35)) venn(x, ilabels = "counts", zcolor = "style") </syntaxhighlight>)
- 14:53, 17 April 2024 Brb talk contribs uploaded File:Tiv-demo.png
- 19:17, 12 March 2024 Brb talk contribs uploaded File:Filtered R mean.png (Use sample mean instead of variance for each gene as the filter statistic. <syntaxhighlight lang='r'> # Follow the previous code chunks M2 <- rowMeans(exprs(ALL_bcrneg)) theta <- seq(0, .80, .01) R_BH <- filtered_R(alpha=.10, M2, p2, theta, method="BH") which.max(R_BH) # 10% <---- so theta=0.1 is the optimal; only 10% genes are removed # 11 max(R_BH) # [1] 270 plot(theta, R_BH, type="l", xlab=expression(theta), ylab="Rejections", main="BH cutoff = 0.1") abline(v=.1, lty=2) <...)
- 07:54, 12 March 2024 Brb talk contribs uploaded File:Rainbow v05.png
- 07:53, 12 March 2024 Brb talk contribs uploaded File:Rainbow s05.png
- 07:52, 12 March 2024 Brb talk contribs uploaded File:Rainbow default.png (<syntaxhighlight lang='r'> library(shiny) # Define the UI ui <- fluidPage( titlePanel("Rainbow Color Palette"), sidebarLayout( sidebarPanel( sliderInput("s_value", "Saturation (s):", min = 0, max = 1, value = 1, step = 0.01), sliderInput("v_value", "Value (v):", min = 0, max = 1, value = 1, step = 0.01) ), mainPanel( plotOutput("rainbow_plot") ) ) ) # Define the server server <- function(input, output) { output$rainbow_plot <- renderPlot({ s <-...)
- 20:41, 11 March 2024 Brb talk contribs uploaded File:Filtered R.png (<syntaxhighlight lang='r'> theta <- seq(0, .80, .01) R_BH <- filtered_R(alpha=.10, S2, p2, theta, method="BH") which.max(R_BH) # 60% <---- so theta=0.6 is the optimal filtering threshold # 61 max(R_BH) # [1] 380 plot(theta, R_BH, type="l", xlab=expression(theta), ylab="Rejections", main="BH cutoff = 0.1") abline(v=.6, lty=2) </syntaxhighlight>)
- 20:35, 11 March 2024 Brb talk contribs uploaded File:Filtered p.png (Note: # x-axis "p cutoff" should be "BH cutoff" or "FDR cutoff". # Each curve represents theta (filtering threshold). For example, theta=.1 means 10% of genes are filtered out before we do multiple testing (or BH adjustment). # It is seen the larger the theta, the more hypotheses are rejected at the same FDR cutoff. For example, #* if theta=0, 251 hypotheses are rejected at FDR=.1 #* if theta=.5, 355 hypotheses are rejected at FDR=.1. <syntaxhighlight lang='r'> BiocManager::install("ALL")...)
- 15:49, 8 March 2024 Brb talk contribs uploaded File:DataOutliers2.png ({{Pre}} puree <- read.csv("https://gist.githubusercontent.com/arraytools/e851ed88c7456779557fbf3ed67b157a/raw/9971c61fea1db99acbd9de17ea82679ba9811358/dataOutliers2.csv", header=F) plot(puree[,1], puree[, 2], xlab="X", ylab="Y") abline(lm(V2 ~ V1, data = puree)) # robust regression require(MASS) summary(rlm(V2 ~ V1, data = puree)) abline(rr.huber <- rlm(V2 ~ V1, data = puree), col = "blue") # quantile regression library(quantreg) abline(rq(V2 ~ V1, data=puree, tau = 0.5), col = "red") # theil...)
- 14:27, 7 March 2024 Brb talk contribs uploaded File:DataOutliers.png ({{Pre}} puree <- read.csv("https://gist.githubusercontent.com/arraytools/47d3a46ae1f9a9cd47db350ae2bd2338/raw/b5cccc8e566ff3bef81b1b371e8bfa174c98ef38/dataOutliers.csv", header = FALSE) plot(puree[,1], puree[, 2], xlim=c(0,1), ylim=c(0,1), xlab="X", ylab="Y") abline(0,1, lty=2) abline(lm(V2 ~ V1, data = puree)) # robust regression require(MASS) summary(rlm(V2 ~ V1, data = puree)) abline(rr.huber <- rlm(V2 ~ V1, data = puree), col = "blue") # almost overlapped with lm() # quantile regressio...)
- 21:41, 10 February 2024 Brb talk contribs uploaded File:R162.png
- 21:53, 8 February 2024 Brb talk contribs uploaded File:Jitterbox.png (<syntaxhighlight lang='r'> nc <- 5 assy <- LETTERS[1:nc] pal <- ggpubr::get_palette("default", nc) set.seed(1) nr <- 5 mat <- matrix(runif(nr*length(assy)), nrow = nr, ncol = length(assy)) set.seed(1) cutoffs <- runif(nc) colnames(mat) <- assy par(mar=c(5,4,1,1)+.1) plot(1, 1, xlim = c(0.5, nc + .5), ylim = c(0,1), type = "n", xlab = "Assay", ylab = "Score", xaxt = 'n') for (i in 1:nc) { rect(i - 0.25, 0, i + 0.25, 1, col = pal[i]) lines(x = c(i - 0.25, i + 0.25), y = c(cutof...)
- 10:25, 19 January 2024 Brb talk contribs uploaded File:RStudioAbort.png
- 19:38, 15 October 2023 Brb talk contribs uploaded File:Geomerrorbarh.png (<syntaxhighlight lang='rsplus'> df <- data.frame( trt = factor(c("Treatment 1", "Treatment 2", "Treatment 3", "Treatment 4", "Treatment 5")), # treatment resp = c(1, 5, 3, 4, 2), # response se = c(0.1, 0.3, 0.3, 0.2, 0.2) # standard error ) # make 'Treatment 1' shown at the top df$trt <- factor(df$trt, levels = c("Treatment 5", "Treatment 4", "Treatment 3", "Treatment 2", "Treatment 1")) p <- ggplot(df, aes(resp, trt)) + geom_point() p + geom_errorbarh(aes(xmax=resp + se, xmin=resp-se),...)
- 16:32, 9 October 2023 Brb talk contribs uploaded File:Calibre.png
- 11:18, 24 August 2023 Brb talk contribs uploaded File:Wheel f400.png
- 11:17, 24 August 2023 Brb talk contribs uploaded File:Wheel f8.png
- 14:59, 22 August 2023 Brb talk contribs uploaded File:Roc asah.png (<pre> par(mfrow=c(1,2)) roc(aSAH$outcome, aSAH$s100b, plot = T) roc(aSAH$outcome2, aSAH$s100b, plot = T) par(mfrow=c(1,1)) </pre>)
- 13:44, 13 August 2023 Brb talk contribs uploaded File:Rotateheatmap.png (<syntaxhighlight lang="rsplus"> library(circlize) set.seed(123) mat = matrix(rnorm(80), 8, 10) rownames(mat) = paste0("R", 1:8) colnames(mat) = paste0("C", 1:10) col_anno = HeatmapAnnotation( df = data.frame(anno1 = 1:10, anno2 = rep(letters[1:3], c(4,3,3))), col = list(anno2 = c("a" = "red", "b" = "blue", "c" = "green"))) row_anno = rowAnnotation( df = data.frame(anno3 = 1:8, anno4 = rep(l...)
- 15:21, 12 August 2023 Brb talk contribs uploaded File:Rotatedend.png
- 15:17, 12 August 2023 Brb talk contribs uploaded File:Dend12.png ({{Pre}} set.seed(123) dat <- matrix(rnorm(20), ncol=2) # perform hierarchical clustering hc <- hclust(dist(dat)) # plot dendrogram plot(hc) # get ordering of leaves ord <- order.dendrogram(as.dendrogram(hc)) ord # [1] 8 3 6 5 10 1 9 7 2 4 # Same as seen on the dendrogram nodes # Rotate the branches (1,9) & (7,2,4) plot(rotate(hc, c("8", "3", "6", "5", "10", "7", "2", "4", "1", "9")), main="Rotated") </pre>)
- 15:39, 6 August 2023 Brb talk contribs uploaded File:Plotly3d.png
- 14:39, 31 July 2023 Brb talk contribs uploaded File:Filter single.png