了解 R 中的 Biclust class
Understanding the Biclust class in R
我是 R 语言的新手,但我正在使用 biclust 包进行双聚类分析。在网络上搜索信息后,我可以运行一些双聚类算法,但我无法访问结果信息。
例如,在运行
之后
> library("biclust")
> data(BicatYeast)
> x<-discretize(BicatYeast)
> Xmotif <- biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
变量 Xmotif 是 class Biclust 的一个对象,它包含结果的双簇。但是,当我在控制台中打印变量 Xmotif R 时,只显示有关 5 个第一双用户的简短信息,如下所示:
> Xmotif
An objects of class Biclust
call:
biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
Number of Clusters found: 50
First 5 Cluster sizes:
BC 1 BC 2 BC 3 BC 4 BC 5
Number of Rows: 3 4 3 5 3
Number of Columns: 47 44 41 38 46
那么,如何获取找到的50个双簇的所有信息呢?
解决方法是使用内置函数writeBiclusterResults()
。
library("biclust")
data(BicatYeast)
x<-discretize(BicatYeast)
Xmotif <- biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
writeBiclusterResults("results.txt", Xmotif,"CC with delta 1.5", dimnames(BicatYeast)[1][[1]], dimnames(BicatYeast)[2][[1]])
我是 R 语言的新手,但我正在使用 biclust 包进行双聚类分析。在网络上搜索信息后,我可以运行一些双聚类算法,但我无法访问结果信息。
例如,在运行
之后> library("biclust")
> data(BicatYeast)
> x<-discretize(BicatYeast)
> Xmotif <- biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
变量 Xmotif 是 class Biclust 的一个对象,它包含结果的双簇。但是,当我在控制台中打印变量 Xmotif R 时,只显示有关 5 个第一双用户的简短信息,如下所示:
> Xmotif
An objects of class Biclust
call:
biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
Number of Clusters found: 50
First 5 Cluster sizes:
BC 1 BC 2 BC 3 BC 4 BC 5
Number of Rows: 3 4 3 5 3
Number of Columns: 47 44 41 38 46
那么,如何获取找到的50个双簇的所有信息呢?
解决方法是使用内置函数writeBiclusterResults()
。
library("biclust")
data(BicatYeast)
x<-discretize(BicatYeast)
Xmotif <- biclust(x, method=BCXmotifs(), number=50, alpha=0.5, nd=20, ns=20, sd=5)
writeBiclusterResults("results.txt", Xmotif,"CC with delta 1.5", dimnames(BicatYeast)[1][[1]], dimnames(BicatYeast)[2][[1]])