add_gene_to_DA_list: Add genes to differential analysis using a...

View source: R/interpretation.R

add_gene_to_DA_listR Documentation

Add genes to differential analysis using a SingleCellExperiment

Description

Add genes to differential analysis using a SingleCellExperiment

Usage

add_gene_to_DA_list(
  scExp,
  IDC_DA,
  feature_ID_col = "ID",
  gene_col = "Gene",
  distanceToTSS = 1000,
  split = TRUE,
  split_char = ", "
)

Arguments

scExp

A SingleCellExperiment object. The rowData must contain a column with genes (see param 'gene_col').

IDC_DA

A data.frame of differential features at each clustering iteration produced by iterative_differential_clustering() ("IDC_DA.csv").

feature_ID_col

A character specifying the column in which to retrieve the feature ID.

gene_col

A character specifying the column in which to retrieve the gene / feature name.

distanceToTSS

An integer specifying the maximum distance to consider a feature close enough to a gene.

split

A logical indicating wether to split the gene column or not

split_char

If split is TRUE. A character by which the gene column is splitted.

Value

A data.frame with the gene column filled. Might contain more rows than the original data.frame if multiple genes per feature were contained in the rowData of the SingleCellExperiment.

Examples

data("scExp", package = "IDclust")
data("IDC_DA_scEpigenomics", package = "IDclust")

IDC_DA_scEpigenomics = add_gene_to_DA_list(
    scExp = scExp, 
    IDC_DA = IDC_DA_scEpigenomics,
    feature_ID_col = "ID", 
    gene_col = "Gene", 
    distanceToTSS = 1000,
    split = TRUE,
    split_char = ", "
)


vallotlab/IDclust documentation built on July 5, 2024, 3:26 p.m.