scoring {macat} | R Documentation

## Compute (regularized) t-scores for gene expression data

### Description

This function computes for all genes in an expression matrix the (regularized) t-scores (statistics) with the given class labels and a number of permutations of these labels. Each gene is also assigned a p-value either empirically from the permutation scores or from a t-distribution.

### Usage

    scoring(data, labels, method = "SAM", pcompute = "tdist",
            nperms = 1000, memory.limit = TRUE, verbose = TRUE)

### Arguments

`data` | Expression matrix with rows = genes and columns = samples
`labels` | Vector or factor of class labels; Scoring works only with two classes!
`method` | Either "SAM" to compute regularized t-scores, or "t.test" to compute Student's t-statistic
`pcompute` | Method to compute p-values for each genes, either "empirical" to do permutations and compute p-values from them, or "tdist" to compute p-values based on respective t-distribution
`nperms` | Number of permutations of the labels to be investigated, if argument 'pcompute="empirical"'
`memory.limit` | Logical, if you have a really good computer (>2GB RAM), setting this FALSE will increase speed of computations
`verbose` | Logical, if progress should be reported to STDOUT

### Details

If 'pcompute="empirical"', the statistic is computed based on the given class labels, afterwards for 'nperms' permutations of the labels. The p-value for each gene is then the proportion of permutation statistics that are higher or equal than the statistic from the real labels. For each gene the 2.5%- and the 97.5%-quantile of the permutation statistics are also returned as lower and upper 'significance threshold'.

If 'pcompute="tdist", the statistic is computed only based on the given class labels, and the p-value is computed from the t-distribution with (Number of samples - 2) degrees of freedom.

### Value

A list, with four components:

`observed` | (Regularized) t-scores for all genes based on the given labels
`pvalues` | P-values for all genes, either from permutations or t-distribution
`expected.lower` | 2.5%-quantile of permutation test-statistics, supposed to be a lower 'significance border' for the gene; or NULL if p-values were computed from t-distribution
`expected.upper` | 2.5%-quantile of permutation test-statistics, supposed to be an upper 'significance border' for the gene; or NULL if p-values were computed from t-distribution

### Note

In MACAT this function is only called internally by `evalScoring`

### Author(s)

MACAT development team

### References

Regarding the regularized t-score see the `macat_docu.pdf`

### See Also

`evalScoring`

### Examples

     ## Not run:
      data(stjd)
      # compute scores for T- vs. B-lymphocyte ALL:
      isT <- as.numeric(stjd$labels=="T")
      TvsB <- scoring(stjd$expr,isT,method="SAM",pcompute="empirical",nperms=100)
      summary(TvsB$observed)

    ## End(Not run)

[Package macat version 1.4.0 Index]