在r中用MSA软件包建立单倍型网络图



我正在试用msa包,并希望创建一个单倍型网络图。当我运行这个命令

hap <- haplotype(firstconvert)
hap  

我收到这个警告信息:

Warning messages:
1: In haplotype.DNAbin(firstconvert) :
some sequences of different lengths were assigned to the same 
haplotype 
2: In haplotype.DNAbin(firstconvert) :
some sequences were not assigned to the same haplotype because 
of ambiguities 

这就是为什么我的单倍型图看起来如此拥挤和混乱。如何使图形看起来更干净?我试着摆弄scale.ratio和突变勾号,以创造一个更好看的情节,但运气不佳。

plot(net,size=attr(net,"freq"),scale.ratio=4
,show.mutation=1,fast=T) 

单倍型网络图

使用msa函数首先对齐序列可能会有所帮助。例如:

FirstMSA<-msa(inputSeqs=firstconvert,method=c("CrustalW"(,cluster="default",gapOpening=";默认";,gapExtension=";默认";,type=";默认";,order=c("aligned"(,verbose=FALSE,help=FALSE(

此外,在你的绘图中建立一个阈值也可能有帮助,这样不太常见的单倍型就不会显示在你的图中(所以只有常见的单倍型(。例如:

图(firstconvert,threshold=c(5,20((#5单倍型是显示的最小单倍型,20是最大

最新更新