map_sampling: Perform bootstrapped mapping using a fraction of provided...

View source: R/annotate.R

map_samplingR Documentation

Perform bootstrapped mapping using a fraction of provided marker genes.

Description

Perform bootstrapped mapping using a fraction of provided marker genes.

Usage

map_sampling(
  train.dat,
  train.cl,
  test.dat,
  markers,
  markers.perc = 0.8,
  iter = 100,
  method = "median",
  verbose = TRUE
)

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.

markers

A vector of marker gene symbols to use for comparisons

markers.perc

The fraction of randomly sampled markers to use for each round. Default = 0.8.

iter

Number of iterations to perform. Default = 100.

method

Method for mapping, passed to map_by_cor(). Default = "median".

verbose

Whether or not to display progress notifications.

Value

a list object with two objects:

  • map.df: A data.frame with the mapping results for each sample in test.dat to the reference

  • map.freq: A table with the frequency of mapping of each sample to each cluster across all iterations.


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