smfishHmrf.generate.centroid.use.exist {smfishHmrf}R Documentation

Use existing cluster centroids

Description

This function assumes that cluster centroids have already been generated from previously applying kmeans on the dataset. The results should have been saved. It will load cluster centroids from existing clustering result files. The results should be found in input_dir directory. The function looks for the following two kmeans result files:

  1. {input_dir}/k_{par_k}/f{name}.gene.ALL.centroid.txt

  2. {input_dir}/k_{par_k}/f{name}.gene.ALL.kmeans.txt

where {} refers to the value of parameters down below

Usage

smfishHmrf.generate.centroid.use.exist(name = "test", input_dir = ".", par_k)

Arguments

name

name of this run

input_dir

input directory

par_k

number of clusters

Value

A kmeans object which is a list with centers and cluster fields

Examples

kmeans_results = system.file("extdata", package="smfishHmrf")
kk = smfishHmrf.generate.centroid.use.exist(name="test", input_dir=kmeans_results, par_k=9)

[Package smfishHmrf version 0.1 Index]