NormMixClusK: Normal mixture model estimation

Description Usage Arguments Value Author(s) Examples

View source: R/NormMixClus-functions.R

Description

Perform co-expression and co-abudance analysis of high-throughput sequencing data, with or without data transformation, using a Normal mixture models for single number of clusters K. The output of NormMixClusK is an S4 object of class RangedSummarizedExperiment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
NormMixClusK(
  y_profiles,
  K,
  alg.type = "EM",
  init.runs = 50,
  init.type = "small-em",
  GaussianModel = "Gaussian_pk_Lk_Ck",
  init.iter = 20,
  iter = 1000,
  cutoff = 0.001,
  verbose = TRUE,
  digits = 3,
  seed = NULL
)

Arguments

y_profiles

y (n x q) matrix of observed profiles for n observations and q variables

K

Number of clusters (a single value).

alg.type

Algorithm to be used for parameter estimation: “EM”, “CEM”, “SEM

init.runs

Number of runs to be used for the Small-EM strategy, with a default value of 50

init.type

Type of initialization strategy to be used: “small-em” for the Small-EM strategy, “random”, “CEM”, or “SEMMax

GaussianModel

One of the 28 forms of Gaussian models defined in Rmixmod, by default equal to the "Gaussian_pk_Lk_Ck" (i.e., a general family model with free proportions, free volume, free shape, and free orientation)

init.iter

Number of iterations to be used within each run for the Small-EM strategry, with a default value of 20

iter

Maximum number of iterations to be run for the chosen algorithm

cutoff

Cutoff to declare algorithm convergence

verbose

If TRUE, verbose output is created

digits

Integer indicating the number of decimal places to be used for the probaPost output

seed

If desired, an integer defining the seed of the random number generator. If NULL, a random seed is used.

Value

An S4 object of class RangedSummarizedExperiment, with conditional probabilities of cluster membership for each gene stored as assay data, and log likelihood, ICL value, number of clusters, and form of Gaussian model stored as metadata.

Author(s)

Cathy Maugis-Rabusseau, Andrea Rau

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Simulate toy data, n = 300 observations
set.seed(12345)
countmat <- matrix(runif(300*4, min=0, max=500), nrow=300, ncol=4)
countmat <- countmat[which(rowSums(countmat) > 0),]
profiles <- transformRNAseq(countmat, norm="none",
                            transformation="arcsin")$tcounts

conds <- rep(c("A","B","C","D"), each=2)

## Run the Normal mixture model for K = 2,3
## Object of class coseqResults
run <- NormMixClus(y=profiles, K=2:3, iter=5)
run

## Run the Normal mixture model for K=2
## Object of class SummarizedExperiment0
run2 <- NormMixClusK(y=profiles, K=2, iter=5)

## Summary of results
summary(run)

## Re-estimate mixture parameters for the model with K=2 clusters
param <- NormMixParam(run, y_profiles=profiles)

andreamrau/coseq documentation built on July 25, 2021, 10:17 a.m.