Skip to content

Commit 07c6db8

Browse files
committed
update files
1 parent e493066 commit 07c6db8

14 files changed

+1060
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.Ruserdata
55
.Rapp.history
66
inst/doc
7+
sccomp.Rproj

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ importFrom(forcats,fct_reorder)
5050
importFrom(ggrepel,geom_text_repel)
5151
importFrom(glue,glue)
5252
importFrom(instantiate,stan_package_model)
53+
importFrom(lifecycle,deprecate_warn)
5354
importFrom(lifecycle,is_present)
5455
importFrom(magrittr,"%$%")
5556
importFrom(magrittr,divide_by)

R/methods.R

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#' @importFrom parallel detectCores
2121
#' @importFrom rlang inform
2222
#' @importFrom lifecycle is_present
23+
#' @importFrom lifecycle deprecate_warn
2324
#'
2425
#' @param .data A tibble including cell_group name column, sample name column,
2526
#' read counts column (optional depending on the input class), and factor columns.

cleanup

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env sh
2+
#
3+
# This script was copied and modified from the source code of the {configure}
4+
# R package by Kevin Ushey. License and copyright are in the comment below.
5+
#
6+
# MIT License
7+
# =====================
8+
#
9+
# Copyright 2021 Kevin Ushey
10+
#
11+
# Permission is hereby granted, free of charge, to any person obtaining a copy
12+
# of this software and associated documentation files (the “Software”), to deal
13+
# in the Software without restriction, including without limitation the rights
14+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
# copies of the Software, and to permit persons to whom the Software is
16+
# furnished to do so, subject to the following conditions:
17+
#
18+
# The above copyright notice and this permission notice shall be included
19+
# in all copies or substantial portions of the Software.
20+
#
21+
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27+
# THE SOFTWARE.
28+
if [ -d "bin" ]; then
29+
rm -rf bin
30+
fi

cleanup.win

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env sh
2+
#
3+
# This script was copied and modified from the source code of the {configure}
4+
# R package by Kevin Ushey. License and copyright are in the comment below.
5+
#
6+
# MIT License
7+
# =====================
8+
#
9+
# Copyright 2021 Kevin Ushey
10+
#
11+
# Permission is hereby granted, free of charge, to any person obtaining a copy
12+
# of this software and associated documentation files (the “Software”), to deal
13+
# in the Software without restriction, including without limitation the rights
14+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
# copies of the Software, and to permit persons to whom the Software is
16+
# furnished to do so, subject to the following conditions:
17+
#
18+
# The above copyright notice and this permission notice shall be included
19+
# in all copies or substantial portions of the Software.
20+
#
21+
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27+
# THE SOFTWARE.
28+
if [ -d "bin" ]; then
29+
rm -rf bin
30+
fi

man/get_output_samples.Rd

+24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/load_model.Rd

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.gitignore

Whitespace-only changes.

src/Makevars

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11

2+
# Generated by rstantools. Do not edit by hand.
3+
4+
STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include', 'src', package = 'StanHeaders', mustWork = TRUE))" -e "message()" | grep "StanHeaders")
5+
6+
STANC_FLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "cat(ifelse(utils::packageVersion('rstan') >= '2.26', '-DUSE_STANC3',''))")
7+
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error $(STANC_FLAGS) -D_HAS_AUTO_PTR_ETC=0
8+
PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
9+
PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")
10+
11+
CXX_STD = CXX17

src/Makevars.win

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11

2+
# Generated by rstantools. Do not edit by hand.
3+
4+
STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include', 'src', package = 'StanHeaders', mustWork = TRUE))" -e "message()" | grep "StanHeaders")
5+
6+
STANC_FLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "cat(ifelse(utils::packageVersion('rstan') >= 2.26, '-DUSE_STANC3',''))")
7+
PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DRCPP_PARALLEL_USE_TBB=1 $(STANC_FLAGS)
8+
PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
9+
PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")
10+
11+
CXX_STD = CXX14

src/install.libs.R

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This script was copied and modified from the source code of the {instantiate}
2+
# R package by William Michael Landau. License and copyright are in the comment below.
3+
#
4+
# MIT License
5+
# =====================
6+
#
7+
# Copyright 2023 Eli Lilly and Company
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a copy
10+
# of this software and associated documentation files (the “Software”), to deal
11+
# in the Software without restriction, including without limitation the rights
12+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
# copies of the Software, and to permit persons to whom the Software is
14+
# furnished to do so, subject to the following conditions:
15+
#
16+
# The above copyright notice and this permission notice shall be included
17+
# in all copies or substantial portions of the Software.
18+
#
19+
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25+
# THE SOFTWARE.
26+
libs <- file.path(R_PACKAGE_DIR, "libs", R_ARCH)
27+
dir.create(libs, recursive = TRUE, showWarnings = FALSE)
28+
for (file in c("symbols.rds", Sys.glob(paste0("*", SHLIB_EXT)))) {
29+
if (file.exists(file)) {
30+
file.copy(file, file.path(libs, file))
31+
}
32+
}
33+
inst_stan <- file.path("..", "inst", "stan")
34+
if (dir.exists(inst_stan)) {
35+
warning(
36+
"Stan models in inst/stan/ are deprecated in {instantiate} ",
37+
">= 0.0.4.9001 (2024-01-03). Please put them in src/stan/ instead."
38+
)
39+
if (file.exists("stan")) {
40+
warning("src/stan/ already exists. Not copying models from inst/stan/.")
41+
} else {
42+
message("Copying inst/stan/ to src/stan/.")
43+
fs::dir_copy(path = inst_stan, new_path = "stan")
44+
}
45+
}
46+
bin <- file.path(R_PACKAGE_DIR, "bin")
47+
if (!file.exists(bin)) {
48+
dir.create(bin, recursive = TRUE, showWarnings = FALSE)
49+
}
50+
bin_stan <- file.path(bin, "stan")
51+
fs::dir_copy(path = "stan", new_path = bin_stan)
52+
callr::r(
53+
func = function(bin_stan) {
54+
instantiate::stan_package_compile(
55+
models = instantiate::stan_package_model_files(path = bin_stan)
56+
)
57+
},
58+
args = list(bin_stan = bin_stan)
59+
)

0 commit comments

Comments
 (0)