knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ttfriends) library(patchwork)
tab <- read.table("~/Downloads/ziyuzhang.txt",sep="\t",header=T,stringsAsFactors = FALSE, row.names = 1) group <- as.data.frame(t(tab[1:2,]),stringsAsFactors =FALSE) names(group) <- c("group","batch") tab <- tab[-c(1,2),] tab <- sapply(tab, as.numeric) rownames(tab) <- 1:nrow(tab)
raw <- table_correct_batch(tab,"raw",plot = T,meta_data = group,batch = "batch",group = "group") raw[[2]] + raw[[3]]
combat <- table_correct_batch(tab,"combat",plot = T,meta_data = group,batch = "batch",group = "group") combat[[2]] + combat[[3]]
limma <- table_correct_batch(tab,"limma",plot = T,meta_data = group,batch = "batch",group = "group") limma[[2]] + limma[[3]]
mnn <- table_correct_batch(tab,"mnn",plot = T,meta_data = group,batch = "batch",group = "group") mnn[[2]] + mnn[[3]]
harmony <- table_correct_batch(tab,"harmony",plot = T,meta_data = group,batch = "batch",group = "group") harmony[[2]] + harmony[[3]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.