clustering_Kmeans: clustering DEGs by K-means

View source: R/smooth.R

clustering_KmeansR Documentation

clustering DEGs by K-means

Description

This function is used to cluster the DEGs in the expression profile by K-means algorithmn

Usage

clustering_Kmeans(
  RNA1,
  K1 = 1,
  ColumnGroup1 = NULL,
  Scale1 = "row",
  Range1 = c(-Inf, Inf),
  Reorder1 = TRUE,
  RevOrder1 = -1,
  NAcolum1 = NULL
)

Arguments

RNA1

expression profile

K1

numbers of bin

ColumnGroup1

vector, if it is not NULL, this function wil sepate columns according to varible ColumnGroup1, default is NULL

Scale1

character, indicating if the values should be centered and scaled in either the row direction or the column direction, or none. Corresponding values are "row", "column" and "none"

Range1

numeric, indicating the range of expression values, defalut is c(-Inf, Inf)

Reorder1

logic, indicating whether to order gene through hclustering, defalut is TRUE

RevOrder1

logic, indicating whether to reverser the order

NAcolum1

vector, indicating which columns need to be removed due to NA values

Value

return a data.frame, and the first column is K-means group

Examples

load(system.file("extdata", "test_clustering.rda", package = "IReNA"))
expression_profile = test_clustering[,-1];expression_profile<-na.omit(expression_profile)
clustering_Kmeans(expression_profile, K1=4, Range1=c(-3,3))

jiang-junyao/IReNA documentation built on Nov. 15, 2024, 1:51 a.m.