clustify_nudge {clustifyr} | R Documentation

## Combined function to compare scRNA-seq data to bulk RNA-seq data and marker list

### Description

Combined function to compare scRNA-seq data to bulk RNA-seq data and marker list

### Usage

    clustify_nudge(input, ...)

    ## Default S3 method:
    clustify_nudge(
      input,
      ref_mat,
      marker,
      metadata = NULL,
      cluster_col = NULL,
      query_genes = NULL,
      compute_method = "spearman",
      weight = 1,
      seurat_out = FALSE,
      threshold = -Inf,
      dr = "umap",
      norm = "diff",
      call = TRUE,
      marker_inmatrix = TRUE,
      mode = "rank",
      obj_out = FALSE,
      rename_prefix = NULL,
      lookuptable = NULL,
      ...
    )

    ## S3 method for class 'seurat'
    clustify_nudge(
      input,
      ref_mat,
      marker,
      cluster_col = NULL,
      query_genes = NULL,
      compute_method = "spearman",
      weight = 1,
      seurat_out = TRUE,
      obj_out = FALSE,
      threshold = -Inf,
      dr = "umap",
      norm = "diff",
      marker_inmatrix = TRUE,
      mode = "rank",
      rename_prefix = NULL,
      ...
    )

    ## S3 method for class 'Seurat'
    clustify_nudge(
      input,
      ref_mat,
      marker,
      cluster_col = NULL,
      query_genes = NULL,
      compute_method = "spearman",
      weight = 1,
      seurat_out = TRUE,
      obj_out = FALSE,
      threshold = -Inf,
      dr = "umap",
      norm = "diff",
      marker_inmatrix = TRUE,
      mode = "rank",
      rename_prefix = NULL,
      ...
    )

### Arguments

`input` | express matrix or object
`...` | passed to matrixize_markers
`ref_mat` | reference expression matrix
`marker` | matrix of markers
`metadata` | cell cluster assignments, supplied as a vector or data.frame. If data.frame is supplied then `cluster_col` needs to be set.
`cluster_col` | column in metadata that contains cluster ids per cell. Will default to first column of metadata if not supplied. Not required if running correlation per cell.
`query_genes` | A vector of genes of interest to compare. If NULL, then common genes between the expr_mat and ref_mat will be used for comparision.
`compute_method` | method(s) for computing similarity scores
`weight` | relative weight for the gene list scores, when added to correlation score
`seurat_out` | output cor matrix or called seurat object
`threshold` | identity calling minimum score threshold, only used when obj_out = T
`dr` | stored dimension reduction
`norm` | whether and how the results are normalized
`call` | make call or just return score matrix
`marker_inmatrix` | whether markers genes are already in preprocessed matrix form
`mode` | use marker expression pct or ranked cor score for nudging
`obj_out` | whether to output object instead of cor matrix
`rename_prefix` | prefix to add to type and r column names
`lookuptable` | if not supplied, will look in built-in table for object parsing

### Value

single cell object, or matrix of numeric values, clusters from input as row names, cell types from ref_mat as column names

### Examples

    # Seurat2
    clustify_nudge(
        input = s_small,
        ref_mat = cbmc_ref,
        marker = cbmc_m,
        cluster_col = "res.1",
        threshold = 0.8,
        seurat_out = FALSE,
        mode = "pct",
        dr = "tsne"
    )

    # Seurat3
    clustify_nudge(
        input = s_small3,
        ref_mat = cbmc_ref,
        marker = cbmc_m,
        cluster_col = "RNA_snn_res.1",
        threshold = 0.8,
        seurat_out = FALSE,
        mode = "pct",
        dr = "tsne"
    )

    # Matrix
    clustify_nudge(
        input = pbmc_matrix_small,
        ref_mat = cbmc_ref,
        metadata = pbmc_meta,
        marker = as.matrix(cbmc_m),
        query_genes = pbmc_vargenes,
        cluster_col = "classified",
        threshold = 0.8,
        call = FALSE,
        marker_inmatrix = FALSE,
        mode = "pct"
    )

[Package clustifyr version 1.0.0 Index]