coseq: Co-expression or co-abudance analysis of high-throughput...

Description Usage Arguments Value Methods (by class) Author(s) Examples

Description

This is the primary user interface for the coseq package. Generic S3 functions are implemented to perform co-expression or co-abudance analysis of high-throughput sequencing data, with or without data transformation, using mixture models. The supported classes are matrix, data.frame, DESeqDataSet, DGEList, DGEExact, DGEGLM, and DGELRT. The output of coseq is an S3 object of class coseq.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
coseq(y, K, subset = NULL, model = "Normal", transformation = "none",
  norm = "TMM", meanFilterCutoff = NULL, modelChoice = "ICL",
  parallel = FALSE, BPPARAM = bpparam(), ...)

## S3 method for class 'matrix'
coseq(y, K, subset = NULL, model = "Normal",
  transformation = "none", norm = "TMM", meanFilterCutoff = NULL,
  modelChoice = "ICL", parallel = FALSE, BPPARAM = bpparam(), ...)

## S3 method for class 'data.frame'
coseq(y, K, subset = NULL, model = "Normal",
  transformation = "arcsin", norm = "TMM", meanFilterCutoff = NULL,
  modelChoice = "ICL", parallel = FALSE, BPPARAM = bpparam(), ...)

## S3 method for class 'DESeqDataSet'
coseq(y, K, subset = NULL, model = "Normal",
  transformation = "arcsin", norm = "TMM", meanFilterCutoff = NULL,
  modelChoice = "ICL", parallel = FALSE, BPPARAM = bpparam(), ...)

Arguments

y

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

K

Number of clusters (a single value or a vector of values)

subset

Optional vector providing the indices of a subset of genes that should be used for the co-expression analysis (i.e., row indices of the data matrix y. For the generic function coseq, the results of a previously run differential analysis may be used to select a subset of genes on which to perform the co-expression analysis. If this is desired, subset.index can also be an object of class DESeqResults (from the results function in DESeq2).

model

Type of mixture model to use (“Poisson” or “Normal”)

transformation

Transformation type to be used: “voom”, “logRPKM” (if geneLength is provided by user), “arcsin”, “logit”, “logMedianRef”, “profile”, “none

norm

The type of estimator to be used to normalize for differences in library size: (“TC” for total count, “UQ” for upper quantile, “Med” for median, “DESeq” for the normalization method in the DESeq package, and “TMM” for the TMM normalization method (Robinson and Oshlack, 2010). Can also be a vector (of length q) containing pre-estimated library size estimates for each sample.

meanFilterCutoff

Value used to filter low mean normalized counts if desired (by default, set to a value of 50)

modelChoice

Criterion used to select the best model. For Gaussian mixture models, “ICL” (integrated completed likelihood criterion) is currently supported. For Poisson mixture models, “ICL”, “BIC” (Bayesian information criterion), and a non-asymptotic criterion calibrated via the slope heuristics using either the “DDSE” (data-driven slope estimation) or “Djump” (dimension jump) approaches may be used. See the HTSCluster package documentation for more details about the slope heuristics approaches.

parallel

If FALSE, no parallelization. If TRUE, parallel execution using BiocParallel (see next argument BPPARAM). A note on running in parallel using BiocParallel: it may be advantageous to remove large, unneeded objects from the current R environment before calling the function, as it is possible that R's internal garbage collection will copy these files while running on worker nodes.

BPPARAM

Optional parameter object passed internally to bplapply when parallel=TRUE. If not specified, the parameters last registered with register will be used.

...

Additional optional parameters.

Value

An S3 object of class coseq containing the following:

results

Object of class NormMixClus or PoisMixClusWrapper, the latter being the class defined by the HTSCluster package

model

Model used, either Normal or Poisson

transformation

Transformation used on the data

tcounts

Transformed data using to estimate model

y_profiles

Normalized profiles for use in plotting

Methods (by class)

Author(s)

Andrea Rau

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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),]
conds <- rep(c("A","B","C","D"), each=2)

## Run the Normal mixture model for K = 2,3,4
run_arcsin <- coseq(y=countmat, K=2:4, iter=5, transformation="arcsin")

## Plot and summarize results
plot(run_arcsin)
summary(run_arcsin)

## Compare ARI values for all models (no plot generated here)
ARI <- compareARI(run_arcsin, plot=FALSE)

## Compare ICL values for models with arcsin and logit transformations
run_logit <- coseq(y=countmat, K=2:4, iter=5, transformation="logit")
compareICL(list(run_arcsin, run_logit))

coseq documentation built on May 2, 2019, 4:55 p.m.