Fix naming issue when "c" GRangePairs.
... | ... |
@@ -61,6 +61,7 @@ GRangePairs <- function(first=GRanges(), second=GRanges(), ..., names=NULL, |
61 | 61 |
}else{ |
62 | 62 |
elementMetadata <- S4Vectors:::make_zero_col_DataFrame(length(first)) |
63 | 63 |
} |
64 |
+ #rownames(elementMetadata) <- names |
|
64 | 65 |
new("GRangePairs",first=first, second=second, NAMES=names, |
65 | 66 |
elementMetadata=elementMetadata) |
66 | 67 |
} |
... | ... |
@@ -100,9 +101,11 @@ setMethod("seqinfo", "GRangePairs", |
100 | 101 |
### Combine |
101 | 102 |
### Exported! |
102 | 103 |
.unlist_list_of_GRangePairs <- function(x, Class){ |
104 |
+ metadata <- do.call(rbind, lapply(x, mcols)) |
|
105 |
+ rownames(metadata) <- NULL |
|
103 | 106 |
new(Class, first=do.call(c, lapply(x, first)), |
104 | 107 |
second=do.call(c, lapply(x, second)), |
105 |
- elementMetadata=do.call(rbind, lapply(x, mcols)), |
|
108 |
+ elementMetadata=metadata, |
|
106 | 109 |
### FIXME: breaks if only some names are NULL |
107 | 110 |
NAMES=unlist(lapply(x, names))) |
108 | 111 |
} |