Skip to content

Commit

Permalink
add MergeRows function
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao-njmu committed Dec 21, 2023
1 parent 7b359a2 commit b0e49c8
Show file tree
Hide file tree
Showing 16 changed files with 444 additions and 256 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ renv.lock
tmaps
src/*.so
src/*.o
test.R
test.R
test.cpp
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Suggests:
umap,
UCell,
withr
LinkingTo: Rcpp
LinkingTo: Rcpp,RcppArmadillo
RoxygenNote: 7.2.3
Config/testthat/edition: 3
URL: https:/zhanghao-njmu/SCP
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export(LineagePlot)
export(ListDB)
export(MNN_integrate)
export(MatrixConvert)
export(MergeRows)
export(PAGAPlot)
export(PrepareDB)
export(PrepareEnv)
Expand Down
16 changes: 14 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

asMatrix <- function(rp, cp, z, nrows, ncols) {
.Call('_SCP_asMatrix', PACKAGE = 'SCP', rp, cp, z, nrows, ncols)
MergeRowsForDense <- function(matrix, groupings) {
.Call('_SCP_MergeRowsForDense', PACKAGE = 'SCP', matrix, groupings)
}

MergeRowsForSparse <- function(matrix, groupings) {
.Call('_SCP_MergeRowsForSparse', PACKAGE = 'SCP', matrix, groupings)
}

MergeRowsC <- function(matrix, groupings) {
.Call('_SCP_MergeRowsC', PACKAGE = 'SCP', matrix, groupings)
}

asMatrixC <- function(rp, cp, z, nrows, ncols) {
.Call('_SCP_asMatrixC', PACKAGE = 'SCP', rp, cp, z, nrows, ncols)
}

1 change: 1 addition & 0 deletions R/SCP-analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ MatrixConvert <- function(matrix, aggregate_method = "sum", geneID_from_IDtype =
return(matrix)
}


#' @export
FindCorrelatedFeatures <- function(srt, feature, method = "ejaccard", assay = NULL, slot = "data") {
assay <- assay %||% DefaultAssay(srt)
Expand Down
Loading

0 comments on commit b0e49c8

Please sign in to comment.