SpaCC_Methy: Performs Spatial Convex Clustering for methylation data

Description Usage Arguments Value Examples

Description

Performs Spatial Convex Clustering for methylation data

Usage

1
2
3
4
5
SpaCC_Methy(X, Coordinates, gamma.seq, dist.cutoff = 20000, sig = 1/5000,
  weights = NULL, center = TRUE, scale = FALSE, nfolds = 5, nu = NULL,
  tol.base = 1e-04, tol.miss = 1e-04, max.iter.base = 5000,
  max.iter.miss = 500, frac = 0.1, parallel = FALSE, gam.rule = 2,
  thresh.mult = 1, thresh.value = NULL)

Arguments

X

A subject (n) by variable (p) matrix; the data

Coordinates

a vector listing genomic coordinates

gamma.seq

a vector of regularization parameters

dist.cutoff

maximum distance at which probes should be regularized

sig

positive scalar controling spatial weight decay

weights

a vector of spatial weights

center

should data be centered

scale

should data be scaled

nfolds

number of folds for cross validation

nu

parameter for augmented lagrangian

tol.base

tolerance level for base function

tol.miss

tolerance for missing function

max.iter.base

maximum number of iterations for base function

max.iter.miss

maximum number of iterations for missing function

frac

fration of fold to use for cross validation

parallel

should algorithm be run in parallel

gam.rule

cross validation rule

thresh.mult

multiplier for threshold value

thresh.value

value of threshold

Value

Labels a vector of cluster labels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data("methy")
methy <- methy[1:20,1:10]
library(dplyr)
library(tidyr)
Coordinates <- methy$Genomic_Coordinate
methy %>%
 tbl_df() %>%
 select(-Chromosome,-Genomic_Coordinate) %>%
 gather(Subject,Value,-ProbeID) %>%
 spread(ProbeID,Value) -> X
SubjectLabels <- X$Subject
X <- X[,-1] %>% as.matrix()
verbose=TRUE
tol.base = 1e-4
tol.miss = 1e-4
max.iter.base=5000
max.iter.miss=500
ngam = 20
gamma.seq <- exp(seq(log(1e-1),log(1e1),length.out=ngam))
ClusterLabels <- SpaCC_Methy(X = X,Coordinates = Coordinates,gamma.seq = gamma.seq)

SpaCCr documentation built on May 2, 2019, 11:02 a.m.

Related to SpaCC_Methy in SpaCCr...