Skip to content

Commit

Permalink
test no drop
Browse files Browse the repository at this point in the history
  • Loading branch information
c-mertes committed Feb 9, 2024
1 parent a1489c8 commit 2bdeb13
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ doc
Meta
.Rproj.user
FRASER_output
/doc/
/Meta/
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions R/countRNAseqData.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions man/countRNA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/subset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 2bdeb13

Please sign in to comment.