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).
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, ... )
The first Seurat object
The second Seurat object
Name of the assay to use in the first object. If NULL, use the default assay
Name of the assay to use in the second object. If NULL, use the default assay
Genomic coordinate separators to use for the first object
Genomic coordinate separators to use for the second object
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
Maximum distance between regions allowed for an intersection to be recorded. Default is 0.
Name for the merged assay. Default is 'peaks'
Project name for the new object
Display messages
Additional arguments passed to CreateAssayObject
CreateAssayObject
Returns a Seurat object
Seurat
This allows a merged object to be constructed with common feature names.
# 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