Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RoxygenNote: 7.1.1
Depends: R(>= 3.4.0), Rcpp
LazyData: true
LinkingTo: Rcpp, RcppArmadillo, RcppProgress
biocViews:
Imports:
dplyr,
cowplot,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ importFrom(methods,as)
importFrom(methods,is)
importFrom(methods,new)
importFrom(rlang,.data)
importFrom(rlang,`%||%`)
useDynLib(harmony)
4 changes: 3 additions & 1 deletion R/RunHarmony.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#'
#'
#' @rdname RunHarmony
#' @importFrom rlang `%||%`
#' @export
RunHarmony <- function(object, group.by.vars, ...) {
UseMethod("RunHarmony")
Expand All @@ -57,6 +58,7 @@ RunHarmony <- function(object, group.by.vars, ...) {
#' @return Seurat (version 3) object. Harmony dimensions placed into
#' dimensional reduction object harmony. For downstream Seurat analyses,
#' use reduction='harmony'.
#' @importFrom rlang `%||%`
#' @export
RunHarmony.Seurat <- function(
object,
Expand All @@ -81,7 +83,7 @@ RunHarmony.Seurat <- function(
project.dim = TRUE,
...
) {
assay.use <- assay.use %||% DefaultAssay(object)
assay.use <- assay.use %||% Seurat::DefaultAssay(object)
if (reduction == "pca") {
tryCatch(
embedding <- Seurat::Embeddings(object, reduction = "pca"),
Expand Down
21 changes: 10 additions & 11 deletions man/RunHarmony.Rd

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

4 changes: 2 additions & 2 deletions man/harmony.Rd

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

5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

Comment on lines +10 to +14
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this change come from? Has it been added by roxygen?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it has. I am unsure whether it is necessary though

// compute_Y
MATTYPE compute_Y(const MATTYPE& Z_cos, const MATTYPE& R);
RcppExport SEXP _harmony_compute_Y(SEXP Z_cosSEXP, SEXP RSEXP) {
Expand Down