导读
barrnap预测细菌基因组16S,获取结果文件第二行最长16S,保留>1400bp的16S。mafft做序列对齐。trimal修剪序列。fasttree建树。ggtree可视化。figtree也可简要查看tree文件。下面从整理好的16S序列文件开始。
1 准备输入文件
2 mafft 对齐序列
windows版本:https://www.jianshu.com/p/d61cf5861e65
mafft --auto bgi_illumina_16S.fa > bgi_illumina_16S_align.fa
3 trimal 修剪
官网:http://trimal.cgenomics.org/
下载:http://trimal.cgenomics.org/downloads
手册:http://trimal.cgenomics.org/getting_started_with_trimal_v1.2
trimal \
-in bgi_illumina_16S_align.fa \
-out bgi_illumina_16S_align_filter.fa \
-automated1
# Use a heuristic selection of the automatic method based on similarity statistics. (see User Guide). (Optimized for Maximum Likelihood phylogenetic tree reconstruction).
4 fasttree建树
官网?:https://bioinformaticsworkbook.org/phylogenetics/FastTree.html#gsc.tab=0
官网?工作流:sequences -> MAFFT -> FastTree -> FigTree -> pdf
fasttree \
-nt bgi_illumina_16S_align_filter.fa \
> bgi_illumina_16S_align_filter.tree
5 ggtree 可视化
library("ggplot2")
library("ggtree")
data = read.tree("bgi_illumina_16S_align_filter.tree")
tree = fortify(data)
gra3 =
ggtree(data, layout="fan", branch.length="none", size=0.8) %<+% pal +
geom_tiplab(aes(label = mark, col = Platform),
size=3) +
scale_color_manual(
values = c("BGI" = "orangered3",
"Illumina" = "deepskyblue3"))
ggsave(gra3, file="tree3.jpg")
iqtree建树
mafft --auto Tree.fas > Tree.fas.mafft
iqtree -s Tree.fas.mafft -m MFP -bb 1000 -bnni -redo -o NC_010433
网友评论