Optimum_KernelC {DeMixT} | R Documentation

## Kernel function for optimizing parameters and hidden variables in DeMixT

### Description

This function is invoked by DeMixT_GS or DeMixT_S1 and DeMixT_S2 to finish parameter estimation by iterated conditional mode algorithm and reconstitute gene expression profile of all components.

### Usage

    Optimum_KernelC(
      inputdata,
      groupid,
      nspikein,
      setting.pi,
      givenpi,
      givenpiT,
      niter,
      ninteg,
      tol,
      sg0 = 0.5^2,
      mu0 = 0,
      pi01 = NULL,
      pi02 = NULL,
      nthread = 1
    )

### Arguments

`inputdata` | A matrix of expression data (e.g gene expressions) from reference (e.g. normal) and mixed samples (e.g. mixed tumor samples). It is a G*M matrix where G is the number of genes and M is the number of samples including reference and mixed samples. Samples with the same tissue type should be placed together in columns (e.g. cbind(normal amples, mixed tumor samples).
`groupid` | A vector of indicators to denote if the corresponding samples are reference samples or mixed tumor samples. DeMixT is able to deconvolve mixed tumor samples with at most three components. We use 1 and 2 to denote the samples referencing the first and the second known component in mixed tumor samples. We use 3 to indicate mixed tumor samples prepared to be deconvolved. For example, in two-component deconvolution, we have c(1,1,...,3,3) and in three-component deconvolution, we have c(1,1,...,2,2,...,3,3).
`nspikein` | The number of spikes in normal reference used for proportion estimation. The default value is min(200, 0.3*My), where My the number of mixed tumor samples. If it is set to 0, proportion estimation is performed without any spike in normal reference.
`setting.pi` | If it is set to 0, then deconvolution is performed without any given proportions; if set to 1, deconvolution with given proportions for the first and the second known component is run; if set to 2, deconvolution is run with given tumor proportions. This option helps to perform deconvolution in different settings. In estimation of component-specific proportions, we use a subset of genes ; so when it is required to deconvolve another subset of genes, we just easily plug back our estimated proportions by setting this option to 1. In our two-step estimation strategy in a three-component setting, this option is set to 2 to implement the second step.
`givenpi` | ST-Vector of proportions. Given the number of mixed tumor samples is My(My<M), ST is set to 2*My in a three-component setting and My in a two-component setting. When setting.pi is 1, it is fixed with the given proportions for the first and the second known component of mixed tumor samples, or for one unknown component when there is just one type of reference tissues. It has the form of Vector PiN1-1, PiN1-2, ..., PiN1-My, PiN2-1, PiN2-2, ..., PiN2-My.
`givenpiT` | ST-Vector of proportions. When setting.pi is set to 2, givenpiT is fixed with given proportions for unknown component of mixed tumor samples. This option is used when we adopt a two-step estimation strategy in deconvolution. It has the form of Vector PiT-1, PiT-2, ..., PiT-My. If option is not 2, this vector can be given with any element.
`niter` | The number of iterations used in the algorithm of iterated conditional modes. A larger value can better guarantee the convergence in estimation but increase the computation time.
`ninteg` | The number of bins used in numerical integration for computing complete likelihood. A larger value can increase accuracy in estimation but also increase the running time. Especially in three-component deconvolution, the increase of number of bins can greatly lengthen the running time.
`tol` | The convergence criterion. The default is 10^(-5).
`sg0` | Initial value for σ^2. The default is 0.5^2.
`mu0` | Initial value for μ. The default is 0.
`pi01` | Initialized proportion for first kown component. The default is Null and pi01 will be generated randomly from uniform distribution.
`pi02` | Initialized proportion for second kown component. pi02 is needed only for running a three-component model. The default is Null and pi02 will be generated randomly from uniform distribution.
`nthread` | The number of threads used for deconvolution when OpenMP is available in the system. The default is the number of whole threads minus one. In our no-OpenMP version, it is set to 1.

### Value

`pi` | Matrix of estimated proportions for each known component. The first row corresponds to the proportion estimate of each sample for the first known component (groupid = 1) and the second row corresponds to that for the second known component (groupid = 2).
`decovExpr` | A matrix of deconvolved expression profiles corresponding to unknown (e.g tumor) component in mixed samples for a given subset of genes. Each row corresponds to one gene and each column corresponds to one sample.
`decovMu` | Estimated Mu of log2-normal distribution for tumor component.
`decovSigma` | Estimated Sigma of log2-normal distribution for tumor component.
`pi1` | An My*I matrix of estimated proportions for each iteration, where I is the number of iteration, for the first known component.
`pi2` | An My*I matrix of estimated proportions for each iteration, where I is the number of iteration, for the second known component.

### Author(s)

Zeya Wang, Wenyi Wang

### References

Wang Z, Cao S, Morris J S, et al. Transcriptome Deconvolution of Heterogeneous Tumor Samples with Immune Infiltration. iScience, 2018, 9: 451-460.

### See Also

http://bioinformatics.mdanderson.org/main/DeMixT

### Examples

    # Example 1: simulated two-component data
      data(test.data.2comp)
    # data.N1 <- SummarizedExperiment::assays(test.data.2comp$data.N1)[[1]]
    # data.Y <- SummarizedExperiment::assays(test.data.2comp$data.Y)[[1]]
    # inputdata <- cbind(data.N1, data.Y)
    # groupid <- c(rep(1, ncol(data.N1)), rep(3, ncol(data.Y)))
    # nspikein <- 0
    # Optimum_KernelC(inputdata, groupid,
    #                 nspikein = nspikein, setting.pi = 0,
    #                 givenpi = rep(0, 2 * ncol(data.y)),
    #                 niter = 10, ninteg = 30, tol = 10^(-4))

[Package DeMixT version 1.4.0 Index]