map_by_cor: Map samples to a training dataset by correlation

View source: R/annotate.R

map_by_corR Documentation

Map samples to a training dataset by correlation

Description

Map samples to a training dataset by correlation

Usage

map_by_cor(train.dat, train.cl, test.dat, method = "median")

Arguments

train.dat

Training data matrix, usually log-transformed CPM

train.cl

Training cluster factor object

test.dat

Data for cells to map to the training set. Should have the same genes as train.dat.

method

Which statistic to compare. "median" or "mean". Default is "median".

Value

a list object containing two objects:

  • pred.df: a data.frame with two columns, pred.cl and pred.score with the predicted cluster and correlation scores.

  • cor.matrix: a matrix object with correlation scores for each cluster.


AllenInstitute/scrattch.hicat documentation built on Oct. 20, 2023, 6:55 a.m.