assess_rank_bias {clustifyr} | R Documentation

## Find rank bias

### Description

Find rank bias

### Usage

    assess_rank_bias(
      avg_mat,
      ref_mat,
      query_genes = NULL,
      res,
      organism,
      plot_name = NULL,
      rds_name = NULL,
      expand_unassigned = FALSE
    )

### Arguments

`avg_mat` | average expression matrix
`ref_mat` | reference expression matrix
`query_genes` | original vector of genes used to clustify
`res` | dataframe of idents, such as output of cor_to_call
`organism` | for GO term analysis, organism name: human - 'hsapiens', mouse - 'mmusculus'
`plot_name` | name for saved pdf, if NULL then no file is written (default)
`rds_name` | name for saved rds of rank_diff, if NULL then no file is written (default)
`expand_unassigned` | test all ref clusters for unassigned results

### Value

pdf of ggplot object

### Examples

    ## Not run:
    avg2 <- average_clusters(
        pbmc_matrix_small,
        pbmc_meta$seurat_clusters
    )
    res <- clustify(
        input = pbmc_matrix_small,
        metadata = pbmc_meta,
        ref_mat = cbmc_ref,
        query_genes = pbmc_vargenes,
        cluster_col = "seurat_clusters"
    )
    call1 <- cor_to_call(
        res,
        metadata = pbmc_meta,
        cluster_col = "seurat_clusters",
        collapse_to_cluster = FALSE,
        threshold = 0.8
    )
    res_rank <- assess_rank_bias(
        avg2,
        cbmc_ref,
        res = call1
    )

    ## End(Not run)

[Package clustifyr version 1.6.0 Index]