gene_ranker: gene_ranker

View source: R/gene_ranker.R

gene_rankerR Documentation

gene_ranker

Description

A function to rank genes between two subsets of scRNAseq data. It uses multiple user-selected statistical approaches. This function works with a simple expression data frame created using 'SCseqtools::df_extractor()“ function

Usage

gene_ranker(
  exprs = NULL,
  pos_marker = NULL,
  neg_marker = NULL,
  sample_id,
  sample_cluster = NULL,
  reference_id,
  reference_cluster = NULL,
  method = "s2n",
  save_ranked_object = F,
  verbose = T
)

Arguments

exprs

Expression data frame (Single cells are in rows, genes and metadata are in columns)

pos_marker

A character vector of gene names to positively gate cells (cells expressing these genes will be included in sample and reference)

neg_marker

A character vector of gene names to negatively gate cells (cells expressing these genes will be excluded from sample and reference )

sample_id

String. Name of the samples to use for the ranking. As the genes will be ranked from sample to reference in decreasing order, samples will be on the left side of enrichment plots. Regex based string matching can be applied including logic operations such as '|'. Data for this parameter should match to entries under 'sample' column from the 'expr' data frame.

sample_cluster

Which clusters to include in the analysis. Data for this parameter should match to entried under 'cluster' column from 'expr' data frame.

reference_id

Same as 'sample_id', but for reference (right side of the enrichment plots i.e. tail end of the ranking)

reference_cluster

Same as sample_cluster but for reference (right side of the enrichment plots)

method

Specify method to use for gene ranking. It can be one of the following: 's2n' (default), 'ttest', 'difference', 'ratio', 'welch', 'mwt', 'bws'. See PMID: 18344518

save_ranked_object

Logical. Set to TRUE for keeping ranking results as a global variable

verbose

Tells you what is being analyzed.

Examples

s2n_ranked <- gene_ranker(exprs = exprs,
                          pos_marker = c('Cd3e', 'Cd8a'), neg_marker = 'Cd4',
                          sample_id = 'young|middle_age', reference_id = 'old_age',
                          method = 's2n')




atakanekiz/SCseqtools documentation built on April 18, 2023, 12:55 a.m.