【问题标题】:creating haplotype network plot with MSA package in r在 r 中使用 MSA 包创建单倍型网络图
【发布时间】:2022-11-03 20:35:12
【问题描述】:

我正在尝试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) 

haplotype network plot

【问题讨论】:

    标签: r


    【解决方案1】:

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

    FirstMSA <- msa(inputSeqs=firstconvert, method=c("CrustalW"), cluster = 'default', gapOpening="default", gapExtension="default", type="default", order=c("aligned") , 详细 = FALSE, 帮助 = FALSE)

    此外,它还可能有助于在您的绘图中建立一个阈值,以便不太常见的单倍型不会显示在您的绘图中(因此只有频繁的单倍型)。例如:

    plot(firstconvert, threshold = c(5,20)) #5 单倍型是显示的最小值,20 是最大值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-14
      • 1970-01-01
      • 2018-06-16
      • 1970-01-01
      • 2020-10-09
      • 1970-01-01
      • 2017-10-23
      相关资源
      最近更新 更多