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,
svg = FALSE,
BSPARAM = BiocSingular::IrlbaParam(),
BPPARAM = BiocParallel::SerialParam()
)Arguments
- sce_norm
(input target) A
SingleCellExperimentobject.- 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 thehvg_cc_genes_var_expl_thresholdprior 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.
- BSPARAM
A BiocSingular::BiocSingularParam object.
- BPPARAM
A BiocParallel::BiocParallelParam object.
- spatial
A logical scalar: if
TRUE, add spatially variable genes extension
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: eitherDataFramereturned fromscran::modelGeneVar()orscran::modelGeneCV2(), orfeature.attributesdataframe returned fromSeurat::SCTransform().Values added by
sce_remove_cc_genes().hvg_ids: a character vector of HVG ENSEMBL IDs.