Signac (version 0.2.4)

MergeWithRegions: Region-aware object merging

Description

This will find intersecting regions in both objects and rename the overlapping features with the region coordinates of the first object (by default; this can be changed with the regions.use parameter).

Usage

MergeWithRegions(
  object.1,
  object.2,
  assay.1 = NULL,
  assay.2 = NULL,
  sep.1 = c("-", "-"),
  sep.2 = c("-", "-"),
  regions.use = 1,
  distance = 0,
  new.assay.name = "peaks",
  project = "SeuratProject",
  verbose = TRUE,
  ...
)

Arguments

object.1

The first Seurat object

object.2

The second Seurat object

assay.1

Name of the assay to use in the first object. If NULL, use the default assay

assay.2

Name of the assay to use in the second object. If NULL, use the default assay

sep.1

Genomic coordinate separators to use for the first object

sep.2

Genomic coordinate separators to use for the second object

regions.use

Which regions to use when naming regions in the merged object. Options are:

  • 1: Use the region coordinates from the first object

  • 2: Use the region coordinates from the second object

distance

Maximum distance between regions allowed for an intersection to be recorded. Default is 0.

new.assay.name

Name for the merged assay. Default is 'peaks'

project

Project name for the new object

verbose

Display messages

...

Additional arguments passed to CreateAssayObject

Value

Returns a Seurat object

Details

This allows a merged object to be constructed with common feature names.

Examples

Run this code
# NOT RUN {
MergeWithRegions(
  object.1 = atac_small,
  object.2 = atac_small,
  assay.1 = 'peaks',
  assay.2 = 'bins',
  sep.1 = c(":","-"),
  sep.2 = c("-","-")
)
# }

Run the code above in your browser using DataLab