limma: setwd("F:\\NEW ANALYST\\marix\\marix-picture") library(limma) rt<-read.csv("GSE19743marix.txt",head=T,sep='\t',row.names = "gene") rt1=log2(rt) class<-c(rep("burn",28),rep("normal",25)) View(class) design<-model.matrix(~factor(class)) colnames(design)<-c("burn","normal") fit<-lmFit(rt1,design) fit2<-eBayes(fit) allDiff=topTable(fit2,adjust='fdr',coef=2,number=200000) write.table(allDiff,file="limmaTab.txt",sep ='\t',quote = F) CIBERSORT: setwd("F:\\NEW ANALYST\\immune\\analysisI") > source('Cibersort.R') > library(preprocessCore) > library(e1071) > result1 <- CIBERSORT('LM22.txt','DATA.txt', perm = 1000, QN = T) write.table(result,file="CIBERSORT",sep ='\t',quote = F) ggolot2: BiocManager::install("ggplot") library(ggplot2) ggplot(df,aes(groups,value,fill = type)) + geom_boxplot(outlier.shape = 21,color = "black") + theme_bw() + labs(x = "Cell Type", y = "Estimated Proportion") + theme(legend.position = "top") + theme(axis.text.x = element_text(angle=80,vjust = 0.5))+ scale_fill_manual(values = mypalette(22)[c(6,1)])+ stat_compare_means(aes(group = Group,label = ..p.signif..),method = "kruskal.test") ggplot(data=a, aes(x=Mixture,y=value,fill=groups))+ geom_violin(width=0.5,position = position_dodge(0.9))+ geom_boxplot(width=0.4,position = position_dodge(0.9))+ labs(x = "Cell Type", y = "Estimated Proportion")+ theme(legend.position = "top")+ theme(axis.text.x = element_text(angle=80,vjust = 0.5))+ scale_fill_manual(values=c("4","2"))+ stat_compare_means(aes(group=groups,label =..p.signif..),method = "t.test") Affy: BiocManager::install("affy") library(affy) setwd("F:\\NEW ANALYST\\marix\\GSE77791\\ALL") burn<- read.table("burn.txt",header = T,sep = "\t") hc<- read.table("hc.txt",header = T,sep = "\t") GLP<- read.table("GLP570.txt",header = T,sep = "\t") cg=intersect(rownames(burn),rownames(hc)) all<-cbind(burn,hc,deparse.level = 1) all<-merge(all,GLP,by=intersect(names(all),names(GLP))) all1<-all(rownames("Gene.Symbol")) a<-hc[c("RORA","NFATC2","CAMK4"),] immune<-exprs(immune_gene) all<-cbind(immu,burn,hc,deparse.level = 1) head(immune_gene) rawdata <- ReadAffy() length(rawdata) eset.mas5<- mas5(rawdata) eset.rma <- rma(rawdata) boxplot(exprSet) boxplot(rawdata) exprSet <- exprs(eset.rma) exprSet1 <- exprs(rawdata) write.table(exprSet,"expr_rma_matrix.txt", quote = F,sep='\t') write.table(exprSet, file = "expr_rma_matrix.txt", append = FALSE, quote = TRUE, sep = " ", eol = "\n", na = "NA", dec = ".", row.names = TRUE, col.names = TRUE, qmethod = c("escape", "double"), fileEncoding = "")