ggtree with funny fonts

showtext is a neat solution to use various types of fonts in R graphs and make it easy to use funny fonts. With showtext, we can draw phylogenetic tree with different types of fonts even with symbolic/icon fonts.

require(showtext)

font.add.google("Gochi Hand", "gochi")
font.add.google("Rock Salt", "rock")

link = "http://img.dafont.com/dl/?f=wm_people_1";
download.file(link, "wmpeople1.zip", mode = "wb");
unzip("wmpeople1.zip");
font.add("wmpeople1", "wmpeople1.TTF");

link = "http://img.dafont.com/dl/?f=emoticons";
download.file(link, "emoticons.zip", mode = "wb");
unzip("emoticons.zip");
font.add("emoticons", "emoticons.ttf");


showtext.auto()
set.seed(2015-05-14)

library(ggplot2)
library(ggtree)

tree <- rtree(30)
ggtree(tree, color="darkgreen") + geom_tiplab(family="gochi") + theme_classic() +
theme(axis.text.x=element_text(size=rel(4), family="emoticons", color="firebrick")) +
scale_y_continuous(breaks=seq(0, 30, 4), labels=letters[c(12:17, 20, 21)]) +
theme(axis.text.y=element_text(size=rel(4), family="wmpeople1", color="#FDAC4F")) +
annotate("text", x=2, y=18, label="Have fun with ggtree!",
family="rock", angle=30, size=12, color="steelblue")

Continue reading

ppiPre抄袭了GOSemSim的代码,证据当然非常充分,比对一下代码就知道了,我在Proper use of GOSemSim一文中,做出了一些比较,另外也可以参考github页面,github记录了ppiPre被暴光抄袭之后所做的修改。 从我给BMC Systems Biology的编辑反馈这件事开始,在这铁板钉钉的事实面前,编辑拖了整整一年,而这一年时间过去了,ppiPre仍没有被编辑部受理。从最早反应这件事情,编辑信誓旦旦说他们很重视这种事情,到后面对我的邮件视而不见,我愿意相信编辑部处理这些事情,需要时间,他们有自己的规则,但一年的时间,不回邮件,冷处理以淡化此事,这绝对不是应该有的规则。 在编辑一直无视我的情况下,我写出了Proper use of GOSemSim一文,列举了一些一模一样的代码,并告知CRAN,当ppiPre被CRAN移除时,我写信给编辑,这时候,编辑告诉我说他们准备要去联系作者了,这时候已经过去半年了,是的!你没有看错,半年过去了,编辑说他们还没去联系作者!我是不相信的。必然是联系了之后,有某些不为人知的原因,所以编辑态度反常,对抄袭这种打鸡血的事情,不断在打太极。

再过二个月,ppiPre的作者邓岳给我写了信:

Continue reading

clusterProfiler supports enrichment analysis of both hypergeometric test and gene set enrichment analysis. It internally supports Gene Ontology analysis of about 20 species, Kyoto Encyclopedia of Genes and Genomes (KEGG) with all species that have annotation available in KEGG database, DAVID annotation (only hypergeometric test supported), Disease Ontology and Network of Cancer Genes (via DOSE for human) and Reactome Pathway (via ReactomePA for several species). This is still not enough for users may want to analyze their data with unsupported organisms, slim version of GO, novel functional annotation (eg GO via blastgo and KEGG via KAAS), unsupported ontology/pathway or customized annotation.

clusterProfiler provides enricher function for hypergeometric test and GSEA function for gene set enrichment analysis that are designed to accept user defined annotation. They accept two additional parameters TERM2GENE and TERM2NAME. As indicated in the parameter names, TERM2GENE is a data.frame with first column of term ID and second column of corresponding mapped gene and TERM2NAME is a data.frame with first column of term ID and second column of corresponding term name. TERM2NAME is optional.

Continue reading

Co-IP is usually used to identified interactions among specific proteins. It is widely used in detecting protein complex. Unfortunately, an identified protein may not be an interactor, and sometimes can be a background contaminant. Ranking proteins can help us to focus a study on a few high quality candidates for subsequent interaction investigation. My R package GOSemSim has been used in many studies to investigate protein protein interaction, see 1, 2, 3, 4 and more.

Continue reading

Author's picture

Guangchuang Yu

Bioinformatics Professor @ SMU

Bioinformatics Professor

Guangzhou