GetIntersectingFeatures function

Find intersecting regions between two objects

Find intersecting regions between two objects

Intersects the regions stored in the rownames of two objects and returns a vector containing the names of rows that intersect for each object. The order of the row names return corresponds to the intersecting regions, i.e. the nth feature of the first vector will intersect the nth feature in the second vector. A distance parameter can be given, in which case features within the given distance will be called as intersecting.

GetIntersectingFeatures( object.1, object.2, assay.1 = NULL, assay.2 = NULL, distance = 0, 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
  • distance: Maximum distance between regions allowed for an intersection to be recorded. Default is 0.
  • verbose: Display messages

Returns

Returns a list of two character vectors containing the row names in each object that overlap each other.

Examples

GetIntersectingFeatures( object.1 = atac_small, object.2 = atac_small, assay.1 = 'peaks', assay.2 = 'bins' )