findVariableGenes: findVariableGenes

View source: R/findVariableGenes.R

findVariableGenesR Documentation

findVariableGenes

Description

Find the most variable genes in the dataset.

Usage

findVariableGenes(scCNA, genes, assay = "logr", top_n = 50)

Arguments

scCNA

scCNA object.

genes

A vector of strings containing the HUGO Symbol for the gene of interest.

assay

String with the name of the assay to pull data with the copy number states for each gene.

top_n

A numeric defining how many variable genes will be returned.

Details

findVariableGenes Runs prcomp to the copy number states of the genes from the provided gene list and returns the one that have the largest absolute variance as assesed by the loadings of the first principal component.

The resulting list of genes is stored within the metadata of the scCNA object and can be accessed with metadata.

Value

A string vector with the HUGO genes in decreasing order of importance stored to the metadata.

Examples

copykit_obj <- copykit_example_filtered()
copykit_obj <- findVariableGenes(copykit_obj,
    genes = c("FHIT", "PTEN", "FOXO1", "BRCA1")
)

navinlabcode/copykit documentation built on Oct. 16, 2024, 2:55 p.m.