GetMarkerExpMatrix: GetMarkerExpMatrix

View source: R/CELESTA_functions.R

GetMarkerExpMatrixR Documentation

GetMarkerExpMatrix

Description

Gets the protein marker expressions and assigns each cell a cell ID.

Only protein markers specified in prior_marker_info are extracted from the imaging_data_file. Cells are assigned IDs from 1 to the total number of cells. If transform_type = 1, then an arcsinh transform is applied to the protein marker expressions.

Usage

GetMarkerExpMatrix(
  prior_marker_info,
  imaging_data_file,
  cofactor,
  transform_type
)

Arguments

prior_marker_info

user-defined cell-type signature matrix.

The data should contain two columns (name X and Y) for the x, y coordinates and a column for each protein marker. Each row represents the data for a single cell, including its x, y coordinates and expression for each protein marker.

imaging_data_file

segmented imaging data. The first column must contain the cell types to be inferred. The second column must contain the lineage information with the following format (without spaces): # _ # _ #.

  • The first number indicates round. Cell types with the same lineage level are inferred at the same round. An higher number indicates higher cell-type resolution. For example, immune cells -> CD3+ T cells -> CD4+ T cells.

  • The second number indicates the previous lineage cell type number for the current cell type. For example, the second number for CD3+ T cell is 5 because it is a subtype of immune cells which have cell type number 5.

  • The third number is a number assigned to the cell type (i.e. cell type number).

The third column and beyond are columns for protein markers.

  • If a protein marker is known to be expressed for that cell type, then it is denoted by a "1".

  • If a protein marker is known to not express for a cell type, then it is denoted by a "0".

  • If the protein marker is irrelevant or uncertain to express for a cell type, then it is denoted by "NA".

cofactor

used to calculate the arcsinh transform on the protein marker expressions

transform_type

indicates a transform type for the protein marker expressions (0 = no transform, 1 = arcsinh transform)

Value

a list with the following information:

cell_ids

the IDs of the cells

original_exp

the original expression matrix (containing only the protein markers specified by prior_marker_info)

marker_exp_matrix or original_exp

the transformed expression matrix (or original expression matrix if a transform is not specified)


plevritis-lab/CELESTA documentation built on Jan. 30, 2023, 3:32 p.m.