analyze_clustering: This function analyzes ST data based on clustering generated...

Description Usage Arguments Value

View source: R/analyze_clustering.R

Description

This function analyzes ST data based on clustering generated by cluster_counts_OL. It calculates a list of genes specific to a certain cluster and identifies differentually expressed genes across clusters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
analyze_clustering(
  counts,
  ids,
  clustering,
  sig.level = 0.001,
  lasso.data = NULL,
  deg.weight = 2,
  lls.weight = 3,
  entropy.weight = 1,
  build.lasso = FALSE,
  gamma = 3,
  ncores = 4,
  normalize = FALSE,
  verbose = TRUE
)

Arguments

counts

non-negative numeric matrix containing gene counts, rows correspond to spots, columns correspond to genes

ids

data frame or matrix assigning spatial coordinates to the spots (see process_input() for details)

clustering

list containing clustering information as returned by cluster_counts_OL (numeric vector assigning spots to clusters)

sig.level

significance level for the t-test between clusters; genes with p-values above this threshold will be removed from output; default 0.05

lasso.data

output of build_lassos function

deg.weight

numeric, weight of the ranking of genes by differential gene expression in the overall ranking; default 2

lls.weight

numeric, weight of the ranking of genes by lls fit in the overall ranking; default 3

build.lasso

logical, should lasso models be calculated? only used if lasso.data is NULL, default FALSE

gamma

numeric, gamma value passed to build_lassos. Determines ration of sparsity and smoothness in the model, default 3

ncores

integer, number of cores used for lasso calculation; default 4

normalize

logical, should counts be normalized with sctransform prior to differential expression testing? default FALSE

verbose

logical, default TRUE

entropy.weightnumeric,

weight of the ranking of genes by entropy in the overall ranking; default 1

Value

list with 2 entries:

  1. differential genes - data frame containing information (name, ckuster, p-value, up-/downregulation) for differentially expressed genes. Ordered by gene rank.

  2. gene.cluster.table - data frame containing for each gene in differential.genes the p-value for differential expression in each cluster


tmirus/TTT documentation built on April 17, 2021, 11:04 p.m.