VISION-class: Initializes a new VISION object.

VisionR Documentation

Initializes a new VISION object.

Description

Initializes a Vision object from an existing Seurat object taking any existing expression data, meta-data, and dimensionality reductions if they exist already

Initializes a Vision object from an existing Seurat object taking any existing expression data, meta-data, and dimensionality reductions if they exist already

Usage

Vision(data, ...)

## S4 method for signature 'matrixORSparse'
Vision(
  data,
  signatures = list(),
  proteinData = NULL,
  unnormalizedData = NULL,
  meta = NULL,
  projection_genes = c("fano"),
  min_signature_genes = 5,
  sig_gene_threshold = 0.001,
  threshold = 0.05,
  perm_wPCA = FALSE,
  projection_methods = c("tSNE30"),
  sig_norm_method = c("znorm_columns", "none", "znorm_rows", "znorm_rows_then_columns",
    "rank_norm_columns"),
  pool = "auto",
  cellsPerPartition = 10,
  name = NULL,
  num_neighbors = NULL,
  latentSpace = NULL,
  latentSpaceName = NULL,
  latentTrajectory = NULL,
  tree = NULL,
  modData = list(),
  hotspot = NULL,
  pools = list()
)

## S4 method for signature 'data.frame'
Vision(data, ...)

## S4 method for signature 'sparseMatrix'
Vision(data, ...)

## S4 method for signature 'dgeMatrix'
Vision(data, ...)

## S4 method for signature 'ExpressionSet'
Vision(data, ...)

## S4 method for signature 'SummarizedExperiment'
Vision(data, ...)

## S4 method for signature 'seurat'
Vision(data, dimRed = NULL, dimRedComponents = NULL, ...)

## S4 method for signature 'Seurat'
Vision(data, assay = "RNA", dimRed = NULL, dimRedComponents = NULL, ...)

Arguments

data

expression data - can be one of these:

  • numeric matrix or sparse matrix (GENES x CELLS)

  • data.frame (GENES x CELLS)

  • ExpressionSet object

  • SummzrizedExperiment object (or extending classes)

Expression data should be scaled and normalized, but not log-transformed.

...

arguments passed to the base Vision constructor

signatures

list of file paths to signature files (.gmt or .txt) or Signature objects. See the createGeneSignature(...) method for information on creating Signature objects.

proteinData

additional protein abundance data (such as ADT counts). Can be either a data.frame or numeric matrix. Should be of shape (CELLS x PROTEINS)

unnormalizedData

data.frame or numeric matrix (dense or sparse) - used when displaying gene expression values in the output report. If supplied this overrides the input in 'data' but only when visualizing data.

meta

data.frame with meta-data for cells. Rows in this data.frame should correspond with columns in the expression data matrix

projection_genes

name of filtering method ('threshold' or 'fano') or list of genes to use when computing projections.

min_signature_genes

Signature that match less than this number of genes in the supplied expression matrix are removed.

sig_gene_threshold

Proportion of cells that a gene must be detected in (nonzero) to be used in signature score calculations.

threshold

Threshold to apply when using the 'threshold' or 'fano' projection genes filter. If greater than 1, this specifies the number of cells in which a gene must be detected for it to be used when computing PCA. If less than 1, this instead specifies the proportion of cells needed

perm_wPCA

If TRUE, apply permutation procedure to calculate significant number of PCs when running PCA. If FALSE (default), retain the top 30.

projection_methods

a character vector specifying which projection methods to apply. Can be:

  • tSNE10 (tSNE with perplexity 10)

  • tSNE30 (tSNE with perplexity 30)

  • ICA

  • ISOMap

  • RBFPCA

  • UMAP

By default will perform tSNE and PCA on the data.

sig_norm_method

Method to apply to normalize the expression matrix before calculating signature scores. Valid options are: "znorm_columns" (default), "none", "znorm_rows", "znorm_rows_then_columns", or "rank_norm_columns"

pool

indicates whether or not to pool cells into supercells. Acceptable values are TRUE, FALSE, or 'auto', the last of which is the default and enables pooling if there are more than 100000 cells.

cellsPerPartition

the target number of cells to put into a supercell when pooling

name

a name for the sample - shown on the output report

num_neighbors

the number of neighbors to consider for downstream analyses.'

latentSpace

latent space for expression data. Numeric matrix or dataframe with dimensions CELLS x COMPONENTS

latentSpaceName

a name for the latent space method (used in output report)

latentTrajectory

trajectory to model cell progression. Wrapped result of a trajectory inference method by the dynverse/dynwrap library

tree

a phylo object

modData

a list of signature objects for user defined modules

hotspot

a list containing one hotspot object precomputed in python and loaded in via reticulate

pools

assignments of cell to micropool. Used when microclustering batches separately and then combining. See vignette for usage.

dimRed

Dimensionality reduction to use for the latentSpace. Default is to look for "pca" and use that if it exists

dimRedComponents

number of components to use for the selected dimensionality reduction. Default is to use all components

assay

The assay slot in the Seurat object to use for expression data

Value

A VISION object

Examples

## Not run: 
expMat <- read.csv("expressionMatrix.csv", row.names=1)
meta <- read.csv("metaData.csv", row.names=1)

sigs <- c("/path/to/signatures/msigdb_Hallmark.gmt",
          "/path/to/signatures/Enrichr/ChEA_2015.txt"
         )


vis <- Vision(data = expMat,
              signatures = sigs,
              meta = meta)

## End(Not run)

YosefLab/FastProjectR documentation built on June 13, 2024, 4:20 p.m.