SingleR.FineTune: SingleR fine-tuning function. Takes top scores per cell type,...

Description Usage Arguments Value

View source: R/SingleR.R

Description

SingleR fine-tuning function. Takes top scores per cell type, finds variable genes in the reference dataset for those cell types and recalculates the scores. This is performed until only one cell type is left.

Usage

1
2
3
SingleR.FineTune(sc_data, ref_data, types, scores, quantile.use,
  fine.tune.thres, genes, sd.thres, mean_mat,
  numCores = SingleR.numCores)

Arguments

sc_data

the single-cell RNA-seq data set as a matrix with genes as rownames. If the data if from a full-length platform, counts must be normalized to gene length (TPM, RPKM, FPKM, etc.).

ref_data

the reference dataset with genes as rownames. Gene names must be in the same format as the single cell data (if sc_data uses genes symbols, ref_data must have the same)

types

a list of cell type names corresponding to ref_data. Number of elements in types must be equal to number of columns in ref_data

scores

the calculated scores per cell type produced by SingleR.ScoreData function

quantile.use

correlation coefficients are aggregated for multiple cell types in the reference data set. This parameter allows to choose how to sort the cell types scores, by median (0.5) or any other number between 0 and 1. The default is 0.9.

fine.tune.thres

the fine tuning step performs the scoring procedure for the top scoring labels using only genes that vary between those cell types in the reference data set. The top labels are those with a score lower than the top score by less than fine.tune.thres

genes

list of genes to use for the annotations, or a method for extracting the genes from the data. Available methods are standard deviation and gene dispersion ("sd" or "de"). default is "de".

sd.thres

if genes=='sd' then this is the threshold for defining a variable gene.

mean_mat

if genes='de' then this is a matrix with one column per cell type, each column is the average of all samples for the corresponding cell type.

numCores

Number of cores to use.

Value

the top labels for each single cell


dviraran/SingleR documentation built on April 21, 2020, 3:23 p.m.