Skip to content

Commit

Permalink
update subset.FRASER drop argument
Browse files Browse the repository at this point in the history
  • Loading branch information
drewjbeh committed Jan 24, 2024
1 parent 1774aa1 commit 266409b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ setReplaceMethod("nonSplicedReads", "FraserDataSet", function(object, value){
#' fds[1:10,by="ss"]
#'
#' @rdname subset
subset.FRASER <- function(x, i, j, by=c("j", "ss")){
subset.FRASER <- function(x, i, j, by=c("j", "ss"), drop = FALSE){
if(length(by) == 1){
by <- whichReadType(x, by)
}
Expand Down Expand Up @@ -288,14 +288,14 @@ subset.FRASER <- function(x, i, j, by=c("j", "ss")){
idxNSR <- rowData(x, type="ss")[['spliceSiteID']] %in% ssIdx

# subset it
nsrObj <- nsrObj[idxNSR,j]
nsrObj <- nsrObj[idxNSR,j,drop]
}

# subset the inheritate SE object
if(length(x) == 0){
i <- NULL
}
subX <- as(as(x, "RangedSummarizedExperiment")[i,j], "FraserDataSet")
subX <- as(as(x, "RangedSummarizedExperiment")[i,j,drop], "FraserDataSet")

# create new FraserDataSet object
newx <- new("FraserDataSet",
Expand Down

0 comments on commit 266409b

Please sign in to comment.