A new method-assay is produced. Raw counts are normalised and HVGs identified using Scanpy

perform.scanpy(
  object,
  assay = "RAW",
  slot = "counts",
  new.assay.suffix = "",
  target_sum = 10000,
  exclude_highly_expressed = FALSE,
  max_fraction = 0.05,
  key_added = "scanpy_norm_factor",
  log1 = TRUE,
  n_top_genes = NULL,
  max_mean = 6,
  min_mean = 0.0125,
  min_disp = 0.5,
  span = 0.3,
  n_bins = 20,
  flavor = "seurat",
  batch_key = NULL,
  vars.to.regress = NULL,
  verbose = FALSE,
  seed = 1234
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

slot

Character. String indicating which slot within the assay should be sourced

new.assay.suffix

Character. What should be added as a suffix to 'SCANPY

target_sum

Numerical. What should the data be scaled to. Default = 1e6

exclude_highly_expressed

Boolean. Should highly expressed genes be excluded. Default = FALSE

max_fraction

Numerical. If exclude_highly_expressed=True, consider cells as highly expressed that have more counts than max_fraction of the original total counts in at least one cell. Default = 0.05

key_added

Character. What should the column name be that contains cell scaling factors. Default = 'scanpy_norm_factor'

n_top_genes

Numerical. How many HVGs should be identified. Default = NULL

max_mean

Numerical. If n_top_genes is NULL, this is the maximum mean to determine HVGs. Default = 6

min_mean

Numerical. If n_top_genes is NULL, this is the minimum mean to determine HVGs. Default = 0.0125

min_disp

Numerical. If n_top_genes is NULL, The minimum dispersion that should be presented in a gene for it to be considered highly varaible. Default = 0.5

span

Numerical. The fraction of cells that should be subset for the LOESS fit model. Default = 0.3

n_bins

Numerical. Number of bins to produce when determining HVGs

batch_key

Character. Which column in the metadata identifies the batches of the cells. Default = NULL

vars.to.regress

Character. A single or multiple columns of information in the metadata that should be regressed from the dataset. Default = NULL

verbose

Logical Should function messages be printed?

seed

Numerical What seed should be set. Default = 1234

flavour

Character. Choosing which HVG selection method to use when, options: 'seurat', 'cell_ranger', 'seurat_v3'. Default = 'seurat'

Value

Produces a new 'methods' assay containing normalised, scaled and HVGs.

Examples


object <- perform.scanpy(object = object, 
                         vars.to.regress = 'RAW_total.counts')
#> Error in is(object = object, class2 = "IBRAP"): object 'object' not found