yebaihe68的个人博客分享 http://blog.sciencenet.cn/u/yebaihe68

博文

利用phylotools拼接序列

已有 3483 次阅读 2017-7-27 16:06 |系统分类:科研笔记|关键词:学者| 软件

做系统发育和DNA条形码研究,经常要用到串联几个序列,常用的方法是将序列按照按顺序排列,若出现缺失序列,则需要自己补齐,最后在mega等软件中连接。此方法适合少量数据,当面对条形码大量数据,且涉及的片段较多时,非常麻烦,常常出错,严重影响数据分析和研究者的耐性。

下面介绍利用phylotools程序包拼接序列。


install.library("phylotools")


library("ape")


matK<-choose.files() # 选择文件


matK.fasta<-read.fasta(matK)  #读取文件


dat2phylip(matK.fasta,"matK.phy") #转换成phylip格式



#选择文件


matK.phy<-choose.files()


trnH_psbA.phy<-choose.files()


#利用phylotools软件包合并数据


#matK_trnH_psbA


supermat(infiles = c(matK.phy,trnH_psbA.phy),outfile="matK_trnH_psbA.phy",partition.file="matK_trnH_psbA.txt")


#转换fasta 格式


#matK_trnH_psbA

matK_trnH_psbA.phy<-choose.files() #选择文件


matK_trnH_psbA.phy<-read.phylip(matK_trnH_psbA.phy) # 读取文件


dat2fasta(matK_trnH_psbA.phy,"matk_trnH_psb.fasta") #转换为fasta格式


******************************分割线**************************

建议将所有序列的名字转换成简单的数字


supermat介绍可以用fasta格式直接拼接,但是个人试验效果不好,还是乖乖用phy格式。


感谢张金龙老师的创造发明!!



https://m.sciencenet.cn/blog-756370-1068332.html


0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-17 07:20

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部