Learn R Programming

scCustomize (version 3.1.3)

Read_Add_cNMF: Read and add results from cNMF

Description

Reads the usage and spectra files from cNMF results and adds them as dimensionality reduction to seurat object.

Usage

Read_Add_cNMF(
  seurat_object,
  usage_file,
  spectra_file,
  normalize = TRUE,
  assay = NULL
)

Value

Seurat object with new dimensionality reduction "cnmf"

Arguments

seurat_object

Seurat object name to add cNMF reduction

usage_file

path and name of cNMF usage file

spectra_file

path and name of cNMF spectra file

normalize

logical, whether to normalize the cNMF usage data, default is TRUE

assay

assay to add reduction. Default is NULL and will use current active assay.

References

For more information about cNMF and usage see https://github.com/dylkot/cNMF

Examples

Run this code
if (FALSE) {
object <- Read_cNMF(seurat_object = object,
usage_file = "example_cNMF/example_cNMF.usages.k_27.dt_0_01.consensus.txt",
spectra_file = "example_cNMF/example_cNMF.gene_spectra_score.k_27.dt_0_01.txt")
}

Run the code above in your browser using DataLab