scrat.new: Initialize the scrat pipeline.

View source: R/scrat.r

scrat.newR Documentation

Initialize the scrat pipeline.

Description

This function initializes the scrat environment and sets the preferences.

Usage

  scrat.new(preferences)

Arguments

preferences

list with the following parameters:

  • indata: input data matrix containing the expression values or a Seurat object (see 'Details' and 'Examples')

  • group.labels: cell assignment to a distinct group, celltype or class (character; "auto" or one label for each cell)

  • group.colors: colors of the cells for visualizations (character; one color for each cell)

  • dim.1stLvlSom: dimension of the SOM grid (integer, >5); use "auto" to use size recommendation

  • database.dataset: type of ensemble dataset queried using biomaRt interface (character); use "auto" to detect parameter automatically; for details see vignette

  • database.id.type: type of rowname identifier in biomaRt database (character); obsolete if database.dataset="auto"

  • standard.spot.modules: spot modules utilized in downstream analyses such as PAT detection and unsupervised cell grouping (character, one of {"overexpression", "kmeans", "group.overexpression", "dmap"})

  • preprocessing: activates/deactivates preprocessing steps (list):

    • cellcycle.correction: enables removal of cell cycle effect from expression values (only available for human and mouse organisms; boolean).

    • create.meta.cells: enables creation of meta-cells to speed up SOM training. Downstream analyses will be performed on meta-cells (boolean).

    • feature.centralization: enables or disables centralization of the features (boolean).

    • sample.quantile.normalization: enables quantile normalization of the cells (boolean).

  • pseudotime.estimation: parameters for wanderlust pseudotime estimation: NULL deactivates pseudotime analysis, TRUE uses standard parameter setting, or a list:

    • n.waypoints: number of waypoint cells (integer, >2 )

    • n.iterations: number of iterations (integer, >1 )

    • k: number of neighbors of each node in graph (integer, >2 )

    • I: number of neighbors cells (integer, 1<I<k )

    • initiator.sample: index or name of initiator cell (integer or character)

Details

scrat requires input of mapped read counts or preprocessed expression data. Additionally, it is recommended to provide group information about the cells (e.g. celltypes), otherwise groups will be assigned automatically based on cells' expression landscapes. indata is to be provided as Seurat object, or as two-dimensional numerical matrix (columns and rows represent the cells and genes, respectively). scrat can apply read count preprocessing or use preprocessed expression values. Please check the vignette for more details on the parameters.

Value

A new scrat environment which is passed to scrat.run.

Examples

env <- scrat.new(list(dataset.name="Example",
                        dim.1stLvlSom="auto",
                        database.dataset="auto",
                        standard.spot.modules="kmeans",
                        
                        preprocessing = list(
                          cellcycle.correction = FALSE,
						  create.meta.cells = TRUE,
                          feature.centralization = TRUE,
                          sample.quantile.normalization = TRUE ), 
                        
                        pseudotime.estimation = list( 
                          n.waypoints=20,
                          n.iterations=20,
                          k=30,
                          I=5,
                          initiator.sample=1) ) )


# definition of indata, group.labels and group.colors
env$indata = matrix( runif(1000), 100, 10 )
env$group.labels = c( rep("class 1", 5), rep("class 2", 4), "class 3" )
env$group.colors = c( rep("red", 5), rep("blue", 4), "green" )


hloefflerwirth/scrat documentation built on Sept. 2, 2022, 4:09 a.m.