clustering: Return clustering assignments produced by tight.clust

Description Usage Arguments Details Value Examples

Description

clustering returns vectors of clustering assignments

Usage

1
clustering(tightclust, data)

Arguments

tightclust

list of objects returned by the tight.clust function

data

data frame of time course of substrates, each substrate is a row

Details

The function clustering creates a named list of cluster assignments for substrates.

Value

named list containing named vectors of cluster assignments, names correspond to rownames in data and names of list are kinase identifiers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
data(phosphonetworkdf)
data(datakin)
# only need what is present in data
phosphonetwork_data <- phosphonetwork_df[
phosphonetwork_df[,"SUB_IDENT"] %in% data_kin[,"SUB_IDENT"]
,]
fam <- list(akt = c("P31749", "P31751"))
kin_data_fam_exc <- KSR.list(phosphonetwork_data[, c("SUB_IDENT", "KIN_ACC_ID")], 
                             kinasefamilies = fam,
                             exclusive = TRUE)
# only do for Akt and Mtor (P31749, P42345)
substrate_profiles <- lapply(kin_data_fam_exc[c("P31749", "P42345")], 
function(x){data_kin[match(x, data_kin[,"SUB_IDENT"]),1:9]})

substrate_profiles_random <- lapply(substrate_profiles, 
function(x){rbind(x, random.data(x, random.seed = 123))})

target <- 3
substrate_profiles_tight <- lapply(substrate_profiles_random, function(x){
tightClust::tight.clust(x, target = target, k.min = 7, resamp.num = 100, random.seed = 12345)
})

kin_clust<- mapply(function(x,y){clustering(x, y)}, 
                        substrate_profiles_tight, substrate_profiles, SIMPLIFY = FALSE)

ksrlive documentation built on May 2, 2019, 10:15 a.m.

Related to clustering in ksrlive...