共 59 篇文章 |
|
## 2.6提取差异矩阵nrDEG_limma_voom = topTable(fit2, coef = "case-control", n = Inf)nrDEG_limma_voom = na.omit(nrDEG_limma_voom)nrDEG_limma_voom = nrDEG_limma_voom[order(nrDEG_limma_voom$logFC),]## 2.7 定义差异基因nrDEG <- nrDEG_limma_voomnrDEG$Group = "notsignificant"dds <- DESeq(dds) nrDEG_... 阅32 转0 评0 公众公开 21-02-23 09:23 |
create_package 创建一个R包use_r()写函数,插入roxygen注释和tag,使用document()生成文档load_all()载入包use_***_license 添加licenseinstall安装包use_testthat() 和use_test()生成测试文件;Imports字段只是确保当我们的包被安装的时候这些包也被安装了,并没有使函数可用,如果想要用这些函数就需要使用::或者import命令来导入函数,所以... 阅1334 转6 评1 公众公开 21-02-23 09:22 |
ComplexHeatmap::pheatmap()包含了pheatmap::pheatmap()中所有的参数,这意味着,当你从pheatmap迁移至ComplexHeatmap时,你无需添加任何额外的步骤,你只需要载入ComplexHeatmap而不是pheatmap包,然后重新运行你原始的pheatmap代码。看起来和pheatmap::pheatmap()还是很一致。compare_pheatmap(test, annotation_col = annotation_col, ... 阅3767 转40 评0 公众公开 20-12-02 10:26 |
# 将igraph weight属性赋值到igraph.weightigraph.weight = E(igraph)$weight.otu_pro = read.table("otu_pro.txt",head=T,row.names=1)# set vertices sizeigraph.size = otu_pro[V(igraph)$name,] # 筛选对应OTU属性igraph.size1 = log((igraph.size$abundance)*100) # 原始数据是什么,为什么*100再取e对数V(igraph)$size = igrap... 阅162 转2 评0 公众公开 20-11-19 08:23 |
laml = read.maf(maf = laml.maf, clinicalData = laml.clin)#Read GISTIC results along with MAFlaml.plus.gistic = read.maf( maf = laml.maf, gisticAllLesionsFile = all.lesions, gisticAmpGenesFile = amp.genes, gisticDelGenesFile = del.genes, gisticScoresFile = scores.gis, isTCGA = TRUE, verbose = FALSE, clinicalData = laml... 阅2301 转26 评0 公众公开 20-05-16 21:11 |
ggplot2|undefined绘制KEGG气泡图。ggplot(pathway,aes(Pvalue,PATHWAY))+geom_point(aes(size=Gene,color=-1*log10(Qvalue)))+scale_color_gradient(low="green",high = "red")+ #labs(color=expression(-log[10](Qvalue)),size="Gene", ##expression函数定义函数样式 []添加下标,^添加上标x="Pvalue&quo... 阅336 转3 评0 公众公开 19-07-17 20:06 |
ggplot2|绘制GO富集柱形图。#将GO_term设定为factor即可按照顺序输出GO_term_order=factor(as.integer(rownames(data)),labels=data$GO_term)ggplot(data=data, aes(x=GO_term_order,y=Num_of_symbols_in_list_in_GO, fill=GO_category)) + geom_bar(stat="identity", width=0.8) + coord_flip() + xlab("GO term") + ylab... 阅3771 转110 评1 公众公开 19-07-17 20:05 |
# 圆的大小不会根据数据量多少改变venn.plot <- draw.pairwise.venn(80, 30, 10, c("First", "Second"), scaled =FALSE)grid.draw(venn.plot)venn.plot <- draw.triple.venn(area1 = 80,area2 = 70,area3 = 50,n12 = 38,n23 = 18,n13 = 28,n123 = 8,category = c("First", "Second", "Thir... 阅674 转11 评0 公众公开 19-07-17 20:04 |
阅1967 转19 评0 公众公开 19-07-17 20:03 |
ggplot2-plotly|让你的火山图“活”过来。P.Val), color = change)) + geom_point(alpha=0.8, size = 1) + theme_bw(base_size = 15) + theme(panel.grid.minor = element_blank(),panel.grid.major = element_blank()) + geom_hline(yintercept=2 ,linetype=4) +geom_vline(xintercept=c(-1,1) ,linetype=4 ) + scale_color_manual(name = &q... 阅779 转23 评0 公众公开 19-07-17 20:02 |