首先要用在线的MAFFT进行Alignment
- 复制粘贴所有的fasta序列到文本框中
- UPPERCASE / lowercase: 选择 Same as input
- Direction of nucleotide sequences: Help 选择 Adjust direction according to the first sequence (accurate enough for most cases)
- Output order: 选择 Same as input
- 最后点击Submit
- 我们将邮件中的结果复制粘贴,另存为一个.fasta的文件.
利用服务器建树
### 平台MAFFT比对
# mafft –h
# High speed mafft in > out
# High accuracy 200条序列、2000个位点以内
# unsure mafft --auto in > out
#命令:mafft --auto(strategy) 输入文件名 > 输出文件名
#eg. mafft --maxiterate 1000 --globalpair ITS\ order.fas > out.tre
#sz 输出文件
mafft --maxiterate 1000 --globalpair all_compare_OTU.fa >all_compare_OTU_Aligned.fa
fasta格式转phy 参考博客文章
可在转换phylip格式时保留名称的所有字符命令:fasta2phy.pl -i 输入文件名.fasta输出文件名为: 输入文件名.phy 使用方法:
python fasta2phylip.py
建Fast树
fasttree -nt all_compare_OTU_Aligned.fa > all_compare_OTU.nwk
建Raxml树,RAxML建树命令
上载 .phy 文件
命令行:raxmlHPC-PTHREADS-SSE3 -f a -s ==输入文件名== -n tre -m ==GTRGAMMA== -x 1234 -# ==1000== -T ==40==
-n 输出文件后缀名
-m 模型
-x 1234随机数
-# bootstrap
-T CPU使用数(最大40,一般使用20左右)
输出文件为: RAxML_bipartitions.tre
nohup raxmlHPC-PTHREADS-SSE3 -f a -s alpha_pep_align_gb.phy -n tre -m GTRGAMMA -x 1234 -# 1000 -T 28
进化模型选择命令
java -jar /lustre/project/og04/shichunwei/biosoft/jmodeltest-2.1.7/jModelTest.jar -d jmodel.fasta -s 11 -i -g 4 -f -AIC -AICc -DT -BIC -a -tr 8 > jmodel.out
Bayes系统发育树
上载 .nex 文件(文件内需带Bayes命令行)
mb -h (help帮助文件)
命令: mb -i ==文件名== 回车
或mpirun -n ==数字== mb -i ==文件名== (mpirun为多线程运 行,n需为nchains的倍数,最大30)
输出文件: .tre
下载到本地
Note: ==红色字体==为自定义部分,根据自己的文件名进行修改。in red: the part named by custom, filename, number…
in blue: command
建树命令
mb -i isolated_Aligned.fasta.nex
离线跑树
nohup 命令(eg. mb -i )文件名& 回车 less nohup.out (输出文件)查看文件进程 或者 jobs