sce_norm_hvg_fn: Find highly variable genes (HVGs).

sce_norm_hvg_fnR Documentation

Find highly variable genes (HVGs).

Description

Prior to HVG selection, cell cycle-related gene can be removed. For more details see the HVG selection section in ⁠02_norm_clustering.yaml⁠ config.

Usage

sce_norm_hvg_fn(
  sce_norm,
  hvg_selection_value,
  hvg_metric = c("gene_var", "gene_cv2", "sctransform"),
  hvg_selection = c("top", "significance", "threshold"),
  hvg_rm_cc_genes = FALSE,
  hvg_cc_genes_var_expl_threshold = 5,
  spatial = FALSE,
  BSPARAM = BiocSingular::IrlbaParam(),
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

sce_norm

(input target) A SingleCellExperiment object.

hvg_selection_value, hvg_metric, hvg_selection

Passed to get_top_hvgs() - see its help page.

hvg_rm_cc_genes

A logical scalar: if TRUE, remove cell cycle-related genes exceeding the hvg_cc_genes_var_expl_threshold prior to HVG selection.

hvg_cc_genes_var_expl_threshold

A numeric scalar: threshold for variance explained. Genes exceeding this threshold will be marked as CC-related.

spatial

A logical scalar: if TRUE, add spatially variable genes extension

BSPARAM

A BiocSingular::BiocSingularParam object.

BPPARAM

A BiocParallel::BiocParallelParam object.

Value

A modified sce_norm object with added HVG data in metadata(). Output target: sce_norm_hvg

The following items of metadata(sce_norm) are added or modified:

  • hvg_metric, hvg_selection, hvg_selection_value, hvg_rm_cc_genes, hvg_cc_genes_var_expl_threshold: values passed to the function.

  • hvg_metric_fit: either DataFrame returned from scran::modelGeneVar() or scran::modelGeneCV2(), or feature.attributes dataframe returned from Seurat::SCTransform().

  • Values added by sce_remove_cc_genes().

  • hvg_ids: a character vector of HVG ENSEMBL IDs.


bioinfocz/scdrake documentation built on Sept. 19, 2024, 4:43 p.m.