mapCells: mapCells

Description Usage Arguments Value Examples

View source: R/mapCells.R

Description

Maps cells on a real cells into a virtual map.

Usage

1
2
3
4
5
6
7
8
mapCells(
  VM,
  RM,
  target_clusters = NULL,
  nr_bin = 10,
  seed = 123,
  trajectory_list = list()
)

Arguments

VM

Virtual map data frame

RM

Real map data frame. It must contain the following columns: - 'Cell_type': Annotated cell type - 'Landmark': Reference landmark to use. It must be named as the landmarks in the virtual map, or 'None' is the cells will be randomly mapped on the matching spatial cluster. - 'Pseudotime' : Pseudotime value for the cell. Landmark cell type must be included in the trajectory. - 'PosLandmark' : Relative position to the landmark. If it is set to'Before', it means that the landmark is later in pseudotime, if it is set to 'After' it means that the landmark is located earlier in pseudotime. - 'Spatial_cluster': Spatial cluster to which it will be mapped. These clusters must aggree with VM$cluster_annot.

target_clusters

Spatial clusters to map. If NULL, all clusters will be mapped. Default: NULL.

nr_bin

Number of bins in which the pseudotime and spatial map (as distance from landmark) ordering are divided for mapping. Default: 10.

seed

Seed (as assignment is random). Default: 123.

trajectory_list

A list with dataframes with Pseudotime and Poslandmark columns inferred from spatial data

Value

A virtual map data.frame containing the assigned real cell and its information.

Examples

1
VM_RNA <- mapCells(VM_RNA, RM_RNA, nr_bin=10)

aertslab/ScoMAP documentation built on Oct. 8, 2021, 1:15 a.m.