Skip to content

Commit

Permalink
remove seedform, code-generate codes and bump BPCells version to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 3, 2024
1 parent aae526e commit 8f0b7d5
Show file tree
Hide file tree
Showing 39 changed files with 572 additions and 926 deletions.
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
issue_comment:
types: [created]

Expand Down
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BugReports: https://github.com/Yunuuuu/BPCellsArray
License: MIT + file LICENSE
Imports:
methods,
BPCells (>= 0.1.0),
BPCells (>= 0.2.0),
DelayedArray (>= 0.28.0),
SparseArray,
Matrix,
Expand All @@ -22,7 +22,7 @@ Imports:
S4Vectors,
BiocSingular
Remotes:
bnprks/BPCells
bnprks/BPCells/r
Suggests:
SingleCellExperiment,
BiocNeighbors,
Expand All @@ -39,13 +39,11 @@ Suggests:
Encoding: UTF-8
biocViews: Software, DataImport, DataRepresentation, Infrastructure
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.2
Collate:
'BPCellsSeed.R'
'utils.R'
'utils-BPCells.R'
'Class-Delayed.R'
'Seed-management.R'
'utils-BPCells.R'
'Class-BPCellsMatrix.R'
'Class-BPCellsSeed.R'
'Class-Transformed.R'
Expand Down Expand Up @@ -77,6 +75,7 @@ Collate:
'showtree.R'
'utils-Rd.R'
'utils-check.R'
'utils.R'
'zzz.R'
Config/testthat/edition: 3
VignetteBuilder: knitr
6 changes: 0 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ S3method(base::as.array,BPCellsMatrix)
S3method(base::as.array,IterableMatrix)
S3method(base::as.matrix,BPCellsDelayedOp)
S3method(base::as.matrix,BPCellsMatrix)
export("seedform<-")
export(BPCellsArray)
export(BPCellsMatrix)
export(BPCellsSeed)
Expand All @@ -19,13 +18,11 @@ export(matrix_stats)
export(pmin_by_col)
export(pmin_by_row)
export(pmin_scalar)
export(pow_slow)
export(rank_transform)
export(readBPCells10xHDF5Matrix)
export(readBPCellsDirMatrix)
export(readBPCellsHDF5Matrix)
export(seedApply)
export(seedform)
export(set_threads)
export(showtree)
export(storage_axis)
Expand All @@ -51,7 +48,6 @@ exportMethods("[<-")
exportMethods("colnames<-")
exportMethods("dimnames<-")
exportMethods("rownames<-")
exportMethods("seedform<-")
exportMethods("type<-")
exportMethods(Arith)
exportMethods(BPCellsSeed)
Expand Down Expand Up @@ -100,7 +96,6 @@ exportMethods(pmin2)
exportMethods(pmin_by_col)
exportMethods(pmin_by_row)
exportMethods(pmin_scalar)
exportMethods(pow_slow)
exportMethods(rank_transform)
exportMethods(rbind)
exportMethods(rbind2)
Expand All @@ -111,7 +106,6 @@ exportMethods(rowSds)
exportMethods(rowSums)
exportMethods(rowVars)
exportMethods(runSVD)
exportMethods(seedform)
exportMethods(set_threads)
exportMethods(show)
exportMethods(storage_axis)
Expand Down
13 changes: 13 additions & 0 deletions R/BPCellsSeed.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@ coerce_into_dgCMatrix <- function(x) {
}
)
}

# helper function used to extract the `IterableMatrix` from the user input,
# although user shouldn't provide `BPCellsDelayedOp` directly, but we also deal
# with it
extract_IterableMatrix <- function(x, seedform) {
if (is_BPCellsArray(x)) {
to_BPCells(x@seed)
} else if (methods::is(x, "BPCellsDelayedOp")) {
to_BPCells(x)
} else {
BPCellsSeed(x)
}
}
Loading

0 comments on commit 8f0b7d5

Please sign in to comment.