Description Usage Arguments Examples
View source: R/smfishHmrf.hmrfem.R
This function is run after the kmeans step. It takes a kmeans object (containing the kmeans result) as input and save the cluster centroids to file.
Note that the location of saving and the file names are decided by the following rule:
{output_dir}
/k_{par_k}
/f{name}
.gene.ALL.centroid.txt
{output_dir}
/k_{par_k}
/f{name}
.gene.ALL.kmeans.txt
where {}
refers to the value of parameters.
1 | smfishHmrf.generate.centroid.save(kk, name = "test", output_dir = ".")
|
kk |
kmeans object |
name |
name of the run |
output_dir |
output directory; where to save the results |
1 2 3 4 | expr_file = system.file("extdata", "ftest.expression.txt", package="smfishHmrf")
y<-smfishHmrf.read.expression(expr_file)
kk = smfishHmrf.generate.centroid(y, par_k=9, par_seed=100, nstart=100)
smfishHmrf.generate.centroid.save(kk, name="test", output_dir=tempdir())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.