identity_table: Report matrix and model identity information.

View source: R/identity.R

identity_tableR Documentation

Report matrix and model identity information.

Description

Write the cell_data_set matrix and model identity information to stdout.

Usage

identity_table(cds)

Arguments

cds

the cell_data_set to use.

Details

A matrix identity is a checksum that is stored in the cell_data_set when a reduced dimension matrix is created and when certain functions read count matrices into the cell_data_set, such as load_mm_data(). At the same time, the same checksum is stored as the model identity in order to link the model to its matrix.

Additionally, Monocle3 stores the identity of the matrix from which the matrix was made. For example, in the case of a UMAP reduced dimension matrix made from a PCA reduced dimension matrix, the cell_data_set has the identities of both the UMAP and the PCA matrices. The UMAP identity is stored as 'matrix_id' and the PCA as 'prev_matrix_id'. Similarly, the model and the previous model identities are stored as 'model_id' and 'prev_model_id'. This allows one to trace a matrix to its origin, which may be helpful when a cell_data_set is partially reprocessed; for example, if preprocess_cds() is re-run but reduce_dimension() is not. Also, it may be helpful when transform models are loaded with the load_transform_models() function, in which case the matrix and model identities will differ.

The identity of the model used to transform a matrix is stored with the matrix identity information as 'model_id'. Ordinarily, the matrix 'matrix_id' and 'model_id' and the corresponding model 'model_id' will have the same string value. However, they differ when the preprocess_transform() and reduce_dim_transform() functions are used to transform a matrix.

Notes:

  • Certain file and directory paths may be stored in the cell_data_set as identifiers.

  • Checksums are calculated using the digest function in the digest package. The matrix dimensions are stored with the checksum.

  • Matrix transformations such as subsetting and row and or column reordering do not affect the matrix identity.

  • The matrix identity string is stored in the internal metadata slot of the cell_data_set and the model identity string is stored in the model object in the cds@reduce_dim_aux slot of the cell_data_set.

Value

Write identity information to stdout.

Examples

  
    cds <- load_a549()
    cds <- preprocess_cds(cds)
    cds <- reduce_dimension(cds)
    identity_table(cds)
  


cole-trapnell-lab/monocle3 documentation built on April 7, 2024, 9:24 p.m.