differential_analysis_scExp {ChromSCape} | R Documentation

## Runs differential analysis between cell clusters

### Description

Based on clusters of cell defined previously, runs non-parametric Wilcoxon Rank Sum test to find significantly depleted or enriched features, in 'one_vs_rest' mode or 'pairwise' mode. In pairwise mode, each cluster is compared to all other cluster individually, and then pairwise comparisons between clusters are combined to find overall differential features using combineMarkers function from scran.

### Usage

    differential_analysis_scExp(
      scExp,
      de_type = "one_vs_rest",
      method = "wilcox",
      qval.th = 0.01,
      cdiff.th = 1,
      block = NULL,
      group = NULL,
      ref = NULL,
      prioritize_genes = nrow(scExp) > 20000,
      max_distanceToTSS = 1000,
      progress = NULL,
      BPPARAM = BiocParallel::bpparam()
    )

### Arguments

`scExp` | A SingleCellExperiment object containing consclust with selected number of cluster.
`de_type` | Type of comparisons. Either 'one_vs_rest', to compare each cluster against all others, or 'pairwise' to make 1 to 1 comparisons. ('one_vs_rest')
`method` | Differential testing method, either 'wilcox' for Wilcoxon non- parametric testing or 'neg.binomial' for edgerGLM based testing. ('wilcox')
`qval.th` | Adjusted p-value threshold. (0.01)
`cdiff.th` | Fold change threshold. (1)
`block` | Use batches as blocking factors ? If TRUE, block will be taken as the column "batch_id" from the SCE. Cells will be compared only within samples belonging to the same batch.
`group` | If de_type = "custom", the sample / cluster of interest as a one- column data.frame. The name of the column is the group name and the values are character either cluster ("C1", "C2", ...) or sample_id.
`ref` | If de_type = "custom", the sample / cluster of reference as a one- column data.frame. The name of the column is the group name and the values are character either cluster ("C1", "C2", ...) or sample_id.
`prioritize_genes` | First filter by loci being close to genes ? E.g. for differential analysis, it is more relevant to keep features close to genes
`max_distanceToTSS` | If prioritize_genes is TRUE, the maximum distance to consider a feature close to a gene.
`progress` | A shiny Progress instance to display progress bar.
`BPPARAM` | BPPARAM object for multiprocessing. See bpparam for more informations. Will take the default BPPARAM set in your R session.

### Details

This functions takes as input a SingleCellExperiment object with consclust, the type of comparison, either 'one_vs_rest' or 'pairwise', the adjusted p-value threshold (qval.th) and the fold-change threshold (cdiff.th). It outputs a SingleCellExperiment object containing a differential list.

### Value

Returns a SingleCellExperiment object containing a differential list.

### Examples

    data("scExp")
    scExp_cf = differential_analysis_scExp(scExp)

[Package ChromSCape version 1.2.62 Index]