Intersects the regions stored in the rownames of two objects and returns a vector containing the names of rows that interesect for each object. The order of the row names return corresponds to the intersecting regions, ie 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, sep.1 = c("-", "-"), sep.2 = c("-", "-"), verbose = TRUE )
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. |
sep.1 | Genomic coordinate separators to use for the first object |
sep.2 | Genomic coordinate separators to use for the second object |
verbose | Display messages |
Returns a list of two character vectors containing the row names in each object that overlap each other.
GetIntersectingFeatures( object.1 = atac_small, object.2 = atac_small, assay.1 = 'peaks', assay.2 = 'bins', sep.1 = c(":", "-"), sep.2 = c("-", "-") )#>#> [[1]] #> [1] "chr1:565107-565550" "chr1:569174-569639" "chr1:713460-714823" #> [4] "chr1:752422-753038" "chr1:762106-763359" "chr1:779589-780271" #> [7] "chr1:793516-793741" "chr1:801120-801338" "chr1:804872-805761" #> [10] "chr1:839520-841123" "chr1:841866-842572" "chr1:856165-857031" #> [13] "chr1:858464-861548" "chr1:870713-871075" "chr1:873704-873830" #> [16] "chr1:875427-878705" "chr1:894021-896898" "chr1:898315-898318" #> [19] "chr1:901313-902847" "chr1:911152-912038" "chr1:919270-919976" #> [22] "chr1:925760-926165" "chr1:926725-927135" "chr1:928630-937949" #> [25] "chr1:939991-941002" "chr1:944476-944998" "chr1:948133-951142" #> [28] "chr1:954372-958413" "chr1:962218-962655" "chr1:967806-970136" #> [31] "chr1:971362-971398" "chr1:973840-977754" "chr1:978275-978602" #> [34] "chr1:994056-995654" "chr1:997359-997774" "chr1:998895-1000200" #> [37] "chr1:1002063-1006231" "chr1:1014697-1015912" "chr1:1034158-1035389" #> [40] "chr1:1051006-1053102" "chr1:1057192-1058404" "chr1:1059663-1059950" #> [43] "chr1:1071616-1073471" "chr1:1079247-1080264" "chr1:1092026-1094240" #> [46] "chr1:1107056-1107833" "chr1:1108888-1109641" "chr1:1124547-1124802" #> [49] "chr1:1134508-1135192" "chr1:1135873-1137356" "chr1:1140204-1144858" #> [52] "chr1:1147592-1153647" "chr1:1154588-1155301" "chr1:1157222-1157824" #> [55] "chr1:1166366-1168282" "chr1:1173312-1173499" "chr1:1181881-1182281" #> [58] "chr1:1185856-1186893" "chr1:1195330-1196057" "chr1:1207999-1210168" #> [61] "chr1:1225538-1225956" "chr1:1226995-1227705" "chr1:1229029-1229400" #> [64] "chr1:1235400-1235791" "chr1:1237343-1237711" "chr1:1240091-1245762" #> [67] "chr1:1246658-1247019" "chr1:1259506-1261414" #> #> [[2]] #> [1] "chr1-565001-570000" "chr1-565001-570000" "chr1-710001-715000" #> [4] "chr1-750001-755000" "chr1-760001-765000" "chr1-775001-780000" #> [7] "chr1-790001-795000" "chr1-800001-805000" "chr1-800001-805000" #> [10] "chr1-835001-840000" "chr1-840001-845000" "chr1-855001-860000" #> [13] "chr1-855001-860000" "chr1-870001-875000" "chr1-870001-875000" #> [16] "chr1-875001-880000" "chr1-890001-895000" "chr1-895001-900000" #> [19] "chr1-900001-905000" "chr1-910001-915000" "chr1-915001-920000" #> [22] "chr1-925001-930000" "chr1-925001-930000" "chr1-925001-930000" #> [25] "chr1-935001-940000" "chr1-940001-945000" "chr1-945001-950000" #> [28] "chr1-950001-955000" "chr1-960001-965000" "chr1-965001-970000" #> [31] "chr1-970001-975000" "chr1-970001-975000" "chr1-975001-980000" #> [34] "chr1-990001-995000" "chr1-995001-1000000" "chr1-995001-1000000" #> [37] "chr1-1000001-1005000" "chr1-1010001-1015000" "chr1-1030001-1035000" #> [40] "chr1-1050001-1055000" "chr1-1055001-1060000" "chr1-1055001-1060000" #> [43] "chr1-1070001-1075000" "chr1-1075001-1080000" "chr1-1090001-1095000" #> [46] "chr1-1105001-1110000" "chr1-1105001-1110000" "chr1-1120001-1125000" #> [49] "chr1-1135001-1140000" "chr1-1135001-1140000" "chr1-1140001-1145000" #> [52] "chr1-1145001-1150000" "chr1-1150001-1155000" "chr1-1155001-1160000" #> [55] "chr1-1165001-1170000" "chr1-1170001-1175000" "chr1-1180001-1185000" #> [58] "chr1-1185001-1190000" "chr1-1195001-1200000" "chr1-1205001-1210000" #> [61] "chr1-1225001-1230000" "chr1-1225001-1230000" "chr1-1225001-1230000" #> [64] "chr1-1235001-1240000" "chr1-1235001-1240000" "chr1-1240001-1245000" #> [67] "chr1-1245001-1250000" "chr1-1255001-1260000" #>