Description Usage Arguments Value Examples

Performs Spatial Convex Clustering for methylation data

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)
``` |

`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 |

Labels a vector of cluster labels

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.