perform.seurat.cca: Performs Seurat Integration

Description Usage Arguments Value Examples

Description

Performs Seurat integration on the supplied assay names. Results are saved under integration_reductions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
perform.seurat.integration(
  object,
  assay,
  normalisation.method,
  batch,
  reduction.name.suffix = NULL,
  nfeatures = 2000,
  reduction = "cca",
  anchors.dims = 1:30,
  l2.norm = T,
  k.anchor = 5,
  k.filter = 200,
  k.score = 30,
  max.features = 200,
  nn.method = "annoy",
  n.trees = 50,
  anchor.eps = 0,
  features = NULL,
  integrate.dims = 1:30,
  k.weight = 100,
  sd.weight = 1,
  sample.tree = NULL,
  integrate.eps = 0,
  save.plot = TRUE
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

batch

Character. Which column in the metadata defines the batches

nfeatures

Numerical. How many features should be found as integration anchors. Default = 3000

reduction

Character. Which reduction method to use: cca = canonical correlation analysis, rpca = reciprocal PCA, rlsi = Reciprocal LSE. Default = cca

l2.norm

Logical. Perform L2 normalization on the CCA cell embeddings after dimensional reduction. Default = TRUE

k.anchor

Numerical. How many neighbors (k) to use when picking anchors. Default = 5

k.filter

Numerical. How many neighbors (k) to use when filtering anchors. Default = 200

k.score

Numerical. How many neighbors (k) to use when scoring anchors. Default = 30

nn.method

Character. Method for nearest neighbor finding. Options include: rann, annoy. Default = annoy

anchor.eps

Numerical. Error bound on the neighbor finding algorithm (from RANN/Annoy) when finding integration genes.

features

Character. Vector of features to use when computing the PCA to determine the weights. Only set if you want a different set from those used in the anchor finding process. Default = NULL

integrate.dims

Numerical. Number of dimensions to use in the anchor weighting procedure. Default = 1:30

k.weight

Numerical. Number of neighbors to consider when weighting anchors. Default = 100

sd.weight

Numerical. Controls the bandwidth of the Gaussian kernel for weighting. Default = 1

sample.tree

Character. Specify the order of integration. If NULL, will compute automatically. Default = NULL

integrate.eps

Numerical. Error bound on the neighbor finding algorithm (from RANN)

save.plot

Boolean. Should the automatically genewrated plot be saved? Default = TRUE

max.features.

Numerical. The maximum number of features to use when specifying the neighborhood search space in the anchor filtering. Default = 200

n.tree

Numerical. More trees gives higher precision when using annoy approximate nearest neighbor search. Default = 50

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
perform.seurat.cca <- function(object = object, 
                                         assay = c('SCT', 'SCRAN', 'SCANPY'), 
                                         normalisation.method = c('perform.sct', 'perform.scran', 'perform.scanpy'), 
                                         batch = original.project, 
                                         reduction.name.suffix=NULL,
                                         nfeatures = 3000,
                                         reduction = 'cca',
                                         anchors.dims = 1:30,
                                         l2.norm = T,
                                         k.anchor = 5,
                                         k.filter = 200,
                                         k.score = 30, 
                                         max.features = 200, 
                                         nn.method = 'annoy', 
                                         n.trees = 50, 
                                         anchor.eps = 0, 
                                         features = NULL,
                                         integrate.dims = 1:30,
                                         k.weight = 100,
                                         sd.weight = 1, 
                                         sample.tree = NULL, 
                                         integrate.eps = 0)

connorhknight/IBRAP_no_decontX documentation built on Feb. 13, 2022, 2:32 p.m.