diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index d1b6cebb..af555b77 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -247,8 +247,8 @@ jobs: run: | options(crayon.enabled = TRUE) rcmdcheck::rcmdcheck( - args = c("--no-manual", "--no-vignettes", "--timings"), - build_args = c("--no-build-vignettes", "--no-manual", "--keep-empty-dirs", "--no-resave-data"), + args = c("--no-manual", "--timings", "--no-vignettes", "--ignore-vignettes"), + build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data", "--no-build-vignettes"), error_on = "warning", check_dir = "check" ) diff --git a/.gitignore b/.gitignore index cdd00e67..051eb063 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ doc Meta .Rproj.user FRASER_output +/doc/ +/Meta/ diff --git a/DESCRIPTION b/DESCRIPTION index 4e96d1f8..595f70ae 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,7 +28,7 @@ biocViews: License: MIT + file LICENSE URL: https://github.com/gagneurlab/FRASER BugRepots: https://github.com/gagneurlab/FRASER/issues -RoxygenNote: 7.3.0 +RoxygenNote: 7.3.1 Encoding: UTF-8 VignetteBuilder: knitr Depends: diff --git a/R/AllGenerics.R b/R/AllGenerics.R index c0202151..6962d3cf 100644 --- a/R/AllGenerics.R +++ b/R/AllGenerics.R @@ -236,12 +236,12 @@ setReplaceMethod("nonSplicedReads", "FraserDataSet", function(object, value){ #' @return A subsetted \code{FraserDataSet} object #' @examples #' fds <- createTestFraserDataSet() -#' fds[1:10,2:3,,drop=FALSE] -#' fds[,samples(fds) %in% c("sample1", "sample2"),,drop=FALSE] -#' fds[1:10,by="ss",,drop=FALSE] +#' fds[1:10,2:3] +#' fds[,samples(fds) %in% c("sample1", "sample2")] +#' fds[1:10,by="ss"] #' #' @rdname subset -subset.FRASER <- function(x, i, j, by=c("j", "ss"), drop = FALSE){ +subset.FRASER <- function(x, i, j, by=c("j", "ss"), drop=FALSE){ if(length(by) == 1){ by <- whichReadType(x, by) } @@ -673,7 +673,7 @@ FRASER.results <- function(object, sampleIDs, fdrCutoff, zscoreCutoff, ans <- lapply(seq_along(sampleChunks), function(idx){ message(date(), ": Process chunk: ", idx, " for: ", type) sc <- sampleChunks[[idx]] - tmp_x <- object[,sc,,drop=FALSE] + tmp_x <- object[,sc] # extract values rawCts <- as.matrix(K(tmp_x)) @@ -865,7 +865,7 @@ mapSeqlevels <- function(fds, style="UCSC", ...){ nonSplicedReads(fds) <- keepStandardChromosomes(nonSplicedReads(fds)) validObject(fds) } - fds <- fds[as.vector(seqnames(fds)) %in% names(mappings),,,drop=FALSE] + fds <- fds[as.vector(seqnames(fds)) %in% names(mappings),] seqlevels(fds) <- as.vector(mappings) seqlevels(nonSplicedReads(fds)) <- as.vector(mappings) diff --git a/R/countRNAseqData.R b/R/countRNAseqData.R index b5909087..e5293dbc 100644 --- a/R/countRNAseqData.R +++ b/R/countRNAseqData.R @@ -231,7 +231,7 @@ getSplitReadCountsForAllSamples <- function(fds, NcpuPerSample=1, "remove this folder: \n", outDir) # create summarized object for counts h5 <- saveAsHDF5(fds, "rawCountsJ", - assay(splitCounts)[,samples(fds),drop=FALSE]) + assay(splitCounts)[,samples(fds)]) colnames(h5) <- samples(fds) final_splitCounts <- SummarizedExperiment( colData=colData(fds), @@ -337,7 +337,7 @@ getNonSplitReadCountsForAllSamples <- function(fds, splitCountRanges, "the non-split reads again, use the option recount=TRUE ", "or remove this folder: \n", outDir) h5 <- saveAsHDF5(fds, "rawCountsSS", - assay(siteCounts)[,samples(fds), drop=FALSE]) + assay(siteCounts)[,samples(fds)]) colnames(h5) <- samples(fds) final_nonSplicedCounts <- SummarizedExperiment( colData=colData(fds), @@ -459,8 +459,8 @@ getSplitCountCacheFile <- function(sampleID, settings){ #' @export countSplitReads <- function(sampleID, fds, NcpuPerSample=1, genome=NULL, recount=FALSE, keepNonStandardChromosomes=TRUE, - bamfile=bamFile(fds[,sampleID,,drop=FALSE]), - pairedend=pairedEnd(fds[,sampleID,,drop=FALSE]), + bamfile=bamFile(fds[,sampleID]), + pairedend=pairedEnd(fds[,sampleID]), strandmode=strandSpecific(fds), cacheFile=getSplitCountCacheFile(sampleID, fds), scanbamparam=scanBamParam(fds), @@ -856,11 +856,11 @@ countNonSplicedReads <- function(sampleID, splitCountRanges, fds, } - bamFile <- bamFile(fds[,samples(fds) == sampleID,,drop=FALSE])[[1]] + bamFile <- bamFile(fds[,samples(fds) == sampleID])[[1]] # unstranded case: for counting only non spliced reads we # skip this information - isPairedEnd <- pairedEnd(fds[,samples(fds) == sampleID,,drop=FALSE])[[1]] + isPairedEnd <- pairedEnd(fds[,samples(fds) == sampleID])[[1]] doAutosort <- isPairedEnd # check cache if available diff --git a/man/countRNA.Rd b/man/countRNA.Rd index b4bbcdb9..440231fe 100644 --- a/man/countRNA.Rd +++ b/man/countRNA.Rd @@ -60,8 +60,8 @@ countSplitReads( genome = NULL, recount = FALSE, keepNonStandardChromosomes = TRUE, - bamfile = bamFile(fds[, sampleID,,drop=FALSE]), - pairedend = pairedEnd(fds[, sampleID,,drop=FALSE]), + bamfile = bamFile(fds[, sampleID]), + pairedend = pairedEnd(fds[, sampleID]), strandmode = strandSpecific(fds), cacheFile = getSplitCountCacheFile(sampleID, fds), scanbamparam = scanBamParam(fds), diff --git a/man/subset.Rd b/man/subset.Rd index 4c1804a9..c59f9c24 100644 --- a/man/subset.Rd +++ b/man/subset.Rd @@ -16,8 +16,10 @@ \item{j}{A integer vector to subset the columns/samples} -\item{by}{a character (j or ss) definig if we subset by +\item{by}{a character (j or ss) defining if we subset by junctions or splice sites} + +\item{drop}{Currently not used} } \value{ A subsetted \code{FraserDataSet} object @@ -27,8 +29,8 @@ Providing subsetting by indices through the single-bracket operator } \examples{ fds <- createTestFraserDataSet() - fds[1:10,2:3,,drop=FALSE] - fds[,samples(fds) \%in\% c("sample1", "sample2"),,drop=FALSE] - fds[1:10,by="ss",,drop=FALSE] + fds[1:10,2:3] + fds[,samples(fds) \%in\% c("sample1", "sample2")] + fds[1:10,by="ss"] } diff --git a/src/Makevars b/src/Makevars index 74e22156..8b3ec4e1 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,4 +1,4 @@ -CXX_STD = CXX11 +# CXX_STD = CXX11 PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -DARMA_DONT_USE_OPENMP PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/Makevars.win b/src/Makevars.win index 74e22156..8b3ec4e1 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,4 @@ -CXX_STD = CXX11 +# CXX_STD = CXX11 PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -DARMA_DONT_USE_OPENMP PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)