我已经使用R中的LEA包完成了对SNP数据的结构分析。但是我具有图形输出,这是一个混乱的混乱,因为个人没有按Q分数排列。有谁知道如何通过Q分数沿x轴对个人进行分组?
output = vcf2geno("kobo.vcf", "kobo.geno")
obj.at = snmf(output, K = 1:10, ploidy = 2, entropy = T,
CPU = 2, project = "new")
qmatrix = Q(obj.at, K =9)
barplot(t(qmatrix), col = c("orange","red","green" , "blue", "pink", "yellow", "grey", "purple"), border = NA, space = 0,
xlab = "Individuals", ylab = "Admixture coefficients")
这是我得到的:
Qmatrix的外观