@@ -270,8 +270,8 @@ setMethod(f = "subsetRegion", signature = c("loops", "GRanges",
270270 intsdf <- as.data.frame(dlo @ interactions )
271271
272272 # Update interactions indices
273- lm <- mapping [match(intsdf $ left , mapping $ queryHits ), 2 , drop = F ]
274- rm <- mapping [match(intsdf $ right ,mapping $ queryHits ), 2 , drop = F ]
273+ lm <- mapping [match(intsdf $ left , mapping $ queryHits ), 2 , drop = FALSE ]
274+ rm <- mapping [match(intsdf $ right ,mapping $ queryHits ), 2 , drop = FALSE ]
275275
276276 # Format new indices matrix
277277 totalupdate <- cbind(unlist(lm ), unlist(rm ))
@@ -282,15 +282,15 @@ setMethod(f = "subsetRegion", signature = c("loops", "GRanges",
282282 # Subset rowData
283283 newRowData <- as.data.frame(dlo @ rowData [cc , ])
284284 colnames(newRowData ) <- colnames(dlo @ rowData )
285+ row.names(newRowData ) <- NULL
285286
286287 # Grab counts indicies; removes lines that don't map to
287288 # anything via making them NAs and then removing them
288289 newcounts <- matrix (dlo @ counts [cc ], ncol = ncol(dlo @ counts ))
289290 colnames(newcounts ) <- colnames(dlo @ counts )
290291
291292 # Update values
292- slot(dlo , " anchors" , check = TRUE ) <- dlo @ anchors [keepTheseAnchors ,
293- ]
293+ slot(dlo , " anchors" , check = TRUE ) <- dlo @ anchors [keepTheseAnchors , ]
294294 slot(dlo , " interactions" , check = TRUE ) <- newinteractions
295295 slot(dlo , " counts" , check = TRUE ) <- newcounts
296296 slot(dlo , " rowData" , check = TRUE ) <- newRowData
@@ -306,8 +306,8 @@ setMethod(f = "subsetRegion", signature = c("loops", "GRanges",
306306 intsdf <- as.data.frame(dlo @ interactions )
307307
308308 # Update interaction indicies
309- lm <- mapping [match(intsdf $ left , mapping $ queryHits ), 2 , drop = F ]
310- rm <- mapping [match(intsdf $ right ,mapping $ queryHits ), 2 , drop = F ]
309+ lm <- mapping [match(intsdf $ left , mapping $ queryHits ), 2 , drop = FALSE ]
310+ rm <- mapping [match(intsdf $ right ,mapping $ queryHits ), 2 , drop = FALSE ]
311311
312312 # Format new indices matrix
313313 totalupdate <- cbind(unlist(lm ), unlist(rm ))
@@ -323,6 +323,8 @@ setMethod(f = "subsetRegion", signature = c("loops", "GRanges",
323323 # Subset rowData
324324 newRowData <- as.data.frame(dlo @ rowData [cc , ])
325325 colnames(newRowData ) <- colnames(dlo @ rowData )
326+ row.names(newRowData ) <- NULL
327+
326328
327329 # Update values
328330 slot(dlo , " anchors" , check = TRUE ) <- newAnchors
0 commit comments