estimate_Schwabe_stage {tricycle} | R Documentation

## Assign cell cycle stages using Schwabe method

### Description

The function is a re-implementation of cell cycle stage assignment method proposed in Schwabe et al.(2020), with a little modification. The core assignment method is not designed by the authors of this package!

### Usage

    estimate_Schwabe_stage(
      x,
      exprs_values = "logcounts",
      batch.v = NULL,
      altexp = NULL,
      cycleGene.l = NULL,
      gname = NULL,
      gname.type = c("ENSEMBL", "SYMBOL"),
      species = c("mouse", "human"),
      AnnotationDb = NULL,
      corThres = 0.2,
      tolerance = 0.3
    )

### Arguments

`x` | A numeric matrix of **log-expression** values where rows are features and columns are cells. Alternatively, a SummarizedExperiment or SingleCellExperiment containing such a matrix.
`exprs_values` | Integer scalar or string indicating which assay of `x` contains the **log-expression** values, which will be used for projection. If the projection already exists, you can ignore this value. Default: 'logcounts'
`batch.v` | A string specifies which column in colData of SummarizedExperiment or SingleCellExperiment to use as the batch variable. Or it can be a vector, of which the number of elements equals to the number of columns of `x`. The 5 stage cell cycle assignments are preformed for each batch separately. No `NA` is permitted. Default: NULL
`altexp` | String or integer scalar specifying an alternative experiment containing the **log-expression** data, which will be used for projection. If the projection is already calculated and stored in the SingleCellExperiment as a dimred, leave this value to default NULL.
`cycleGene.l` | A list contains the marker genes for each stage. The stage names should be included as names of the elements. If user feed custom list, they should make sure that the same gene id type for `x` and `cycleGene.l`. If not custom list is given, `RevelioGeneList` will be used. Default: NULL
`gname` | Alternative rownames of `x`. If provided, this will be used to map genes within `x` with genes in `ref.m`. If not provided, the rownames of `x` will be used instead. Default: NULL
`gname.type` | The type of gene names as in `gname` or rownames of `x`. It can be either 'ENSEMBL' or 'SYMBOL'. If the user uses custom `ref.m`, this value will have no effect. Default: 'ENSEMBL'
`species` | The type of species in `x`. It can be either 'mouse' or 'human'. If the user uses custom `cycleGene.l`, this value will have no effect. Default: 'mouse'
`AnnotationDb` | An AnnotationDb objects. It is used to map ENSEMBL IDs to gene SYMBOLs. If no AnnotationDb object being given, the function will use `org.Hs.eg.db` or `org.Mm.eg.db` for human and mouse respectively.
`corThres` | For each batch and each stage, correlations between expression of each gene and the mean of all genes belonging to that stage will be calculated to filter the final gene list used for inference. The genes with a correlation between `corThres` will not be used for calculating z-scores. Default: 0.2
`tolerance` | For each cell, the function will compare the largest two z-scores. If the difference between those two z-scores is less than `tolerance`, the cell will be treated un-assignable with `NA` value returned for that cell. Default: 0.3

### Details

The function is a re-implementation of cell cycle stage assignment method proposed in Schwabe et al.(2020), with a little modification. We include this function only for the purpose of convenience. The core assignment method is not designed by the authors of this package! Breiefly, the function assigns cells to discretized cell cycle stages by comparing the z-scores calculated for each stage markers. Without cycleGene.l input, `RevelioGeneList` will be used. If you use this function, you should cite Schwabe et al.(2020).

### Value

If the input is a numeric matrix, the discretized cell cycle stages - a factor vector corresponding to each cell will be returned.

If the input is SummarizedExperiment, the original SummarizedExperiment with the discretized cell cycle stages stored in colData with name 'CCStage' will be returned.

If the input is SingleCellExperiment, the original SingleCellExperiment with the discretized cell cycle stages stored in colData with name 'CCStage' will be returned.

### Author(s)

Shijie C. Zheng

### References

Schwabe D, et al. The transcriptome dynamics of single cells during the cell cycle. Molecular Systems Biology (2020) 16: e9946 doi:10.15252/msb.20209946.

Zheng SC, et al. Universal prediction of cell cycle position using transfer learning.

### Examples

    data(neurosphere_example, package = "tricycle")
    neurosphere_example <- estimate_Schwabe_stage(neurosphere_example,
     gname.type = "ENSEMBL", species = "mouse")
    neurosphere_example2 <- estimate_Schwabe_stage(neurosphere_example, batch.v = "sample")
    neurosphere_example3 <- estimate_Schwabe_stage(neurosphere_example,
     batch.v = neurosphere_example$sample)
    neurosphere_example <- project_cycle_space(neurosphere_example)
    plot(reducedDim(neurosphere_example, "tricycleEmbedding"),
     col = neurosphere_example$CCStage)

[Package tricycle version 1.2.1 Index]