非常方便的在图片中抽提颜色 #devEMF Rstudio不能够直接输出emf格式图片,借助devEMF包可以实现
简单用法
library(devEMF)
emf("bar.emf")
plot(1,1)
dev.off()
或者借助savePlot()函数在原生的Rgui中运行
library(ggplot2)
ggplot()+geom_point(aes(x=1,y=1))
savePlot(filename="practice",type="emf")#文件名不用添加后缀
在生信技能树论坛闲逛的时候发现有人分享的文章,自己记录下来,可能会用到;这个包用来下载测序的原始数据文件,之前自己都是用Aspera来下载,速度很快,不知道这个R包的下载速度如何,有机会尝试一下;使用bioconductor安装,使用方法可以参考帮助文档 #diagram visualising simple graphs, flowcharts, and webs
看到简书作者 土豆学生信 分享的文章 TCGA工具-GDCRNATools学习笔记 。记录的原因是看到文章里非常漂亮的热图,可能会用的到。
Y叔公众号biobabble分享的文章《我不会用illustrator,只会用PPT》,主要功能是可以将R生成的图片导出为ppt, word, excel等格式
可以抓取NBA的数据 #pacMethods A collection of PCA methods http://bioconductor.org/packages/release/bioc/html/pcaMethods.html
https://github.com/vqv/ggbiplot 展示PCA分析结果,出图非常漂亮 https://blog.csdn.net/woodcorpse/article/details/78863454 详细介绍
skim()函数简单理解是summary()函数升级版
Y叔公众号 biobabble 分享的文章《一条指令把统计+画图都给做了?似乎太美好!》推荐 ggstatsplot,吐槽 ggpubr
vcfR is a package intended to help visualize, manipulate and quality filter data in VCF files. https://knausb.github.io/vcfR_documentation/ 帮助文档
单倍型网络 Manipulating DNA Sequences and Estimating Unambiguous Haplotype Network with Statistical Parsimony (啥是单倍型还是不知道呀!)
Population and Evolutionary Genetics Analysis System (有人说可以做单倍型网络)
Search and Retrieve Scientific Publication Records from PubMed 生信技能树微信公众号推送文章介绍详细使用方法,可以通过指定关键词检索论文
learnPopGen is intended for teaching and learning important concepts in population genetics, evolutionary biology, quantitative genetics, statistics, and evolutionary theory.
群体基因组学分析可能会用到
Export or Graph and Tables to 'Microsoft' Office and Import Figures and Tables 整个包好像有一个函数可以抽取pdf文件的配色,比如某篇论文的图片配色非常喜欢,可以直接提取并且用到自己想画的图中——infigure
Geoms to make ridgeline plots with ggplot2 山脊图 介绍https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.html
allowing users to gather and combine data from multiple NCBI databases in the comfort of an R session or script.
用来画韦恩图的包,但是自己的R版本是3.4.2,暂时还不能够安装 重新试了一下,使用函数install_github()可以安装
https://github.com/YinLiLin/R-CMplot 用来画曼哈顿图的R包
Y叔出品,将图转换成ggplot对象,然后使用cowplot()函数画图
画韦恩图,好像各部分是按比例来的
Y叔公众号biobabble推荐,cowplot作者的新包,支持使用markdown/html语法画文本
主成分分析结果可视化包,结果图片非常好看。教程http://www.sthda.com/english/articles/31-principal-component-methods-in-r-practical-guide/112-pca-principal-component-analysis-essentials/ 聚类树图也可以很好看https://www.cnblogs.com/payton/p/6418755.html
可视化GO注释结果
image.png
弦图 devtools::install_github("mattflor/chorddiag")
image.png
可视化多序列比对结果,暂时还没搞懂怎么用
韦恩图
image.png
圆角柱形图 Sometimes it is useful to stylize column charts a bit more than just bland rectangles. Methods are provided to create rounded rectangle segmented column charts chicklet查了一下,只找到了少妇,小姑娘的意思,为什么会用这个名字呢?下面是帮助文档里的例子
image.png
为ggplot2补充一些主题,好像主要是字体方面的,帮助文档中的一个例子
image.png
多变量探索性数据分析
全基因组学关联分析 github主页https://github.com/xiaolei-lab/rMVP
image.png
image.png
教程地址 https://github.com/thibautjombart/adegenet/wiki/Tutorials
devtools::install_github('badbye/baidumap') library(baidumap) options(baidumap.key = '百度地图API') getCoordinate("江苏省南京市",formatted=T) longtitude latitude 118.80242 32.06465 查询城市经纬度
画地图
install.packages("hchinamap")
help(package="hchinamap")
dir<-tempdir()
download.file('https://czxb.github.io/br/chinadf.rda', file.path(dir, 'chinadf.rda'))
load(file.path(dir,'chinadf.rda'),verbose=T)
chinadf[1:20,]
table(chinadf$name)
library(dplyr)
library(hchinamap)
china<-chinadf%>%
dplyr::filter(region=="China")
china
hchinamap(name=china$name,value=china$value)