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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.1
rev: v0.4.3.9026
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
Expand All @@ -13,7 +13,7 @@ repos:
- id: deps-in-desc
args: [--allow_private_imports]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
exclude: '\.Rd'
Expand Down
1 change: 0 additions & 1 deletion R/DOT.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ build_model_dot <- function() {
}



#' Deconvolute with DOT
#'
#' Runs DOT deconvolution and returns the DOT weight matrix with column names
Expand Down
3 changes: 0 additions & 3 deletions R/benchmarking.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ plot_scatter <- function(spe = NULL, value1, value2, spe1 = NULL, spe2 = NULL, l
}





#' Compare Signatures
#'
#' Creates a scatterplot comparing two signature matrices across shared genes.
Expand Down
3 changes: 0 additions & 3 deletions R/cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ cluster <- function(spe,
cli::cli_alert_info(paste("Cluster resolution:", toString(clusres)))



cli::cli_progress_step("Extracting data", msg_done = "Extracted data for clustering")

# create seurat object
Expand Down Expand Up @@ -139,7 +138,6 @@ cluster <- function(spe,
}



cli::cli_progress_done()

return(spe)
Expand Down Expand Up @@ -199,7 +197,6 @@ get_cluster_features <- function(spe,
clusters <- colData(spe)[, clusterid]



# Scores
if (spmethod == "expression") {
if (is.element("cpm", assayNames(spe)) && !is.null(spe@assays@data$cpm)) {
Expand Down
2 changes: 0 additions & 2 deletions R/deconvolution_algorithms.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ deconvolute <- function(spatial_obj, signature = NULL, single_cell_obj = NULL,
cli::cli_progress_step("testing parameter", msg_done = "parameter OK")




if (is.null(spatial_obj)) {
stop("Parameter 'spatial_obj' is missing or null, but is required.")
}
Expand Down
1 change: 0 additions & 1 deletion R/preprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ preprocess <- function(object, min_umi = 500, max_umi = NULL, assay = "counts",
}



cli::cli_progress_step(
msg = "Checking for ENSEMBL Identifiers",
msg_done = "Finished Preprocessing"
Expand Down
1 change: 0 additions & 1 deletion R/spatial_correlation.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ spatialcorr <- function(spe,
}



# Select variables of interests
# If variables is not provided but method is specified, the function selects variables based on those available in the dataset that start with the specified method.
if (is.null(variables) && !is.null(method)) {
Expand Down
4 changes: 0 additions & 4 deletions R/subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ subsetSCE <- function(sce, cell_type_col = "celltype_major", scenario = "even",
}






#' Subset a SpatialExperiment by Spatial Coordinates
#'
#' Filters a `SpatialExperiment` to spots that fall within the provided x/y ranges
Expand Down
1 change: 0 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ checkENSEMBL <- function(names) {
}



#' Annotate Specific Spots in a SpatialExperiment
#'
#' Adds a new `colData` column that marks selected spots with `value_pos` and all
Expand Down
3 changes: 0 additions & 3 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ plot_comparison <- function(spe, cell_type_1 = NULL, cell_type_2 = NULL,
}



#' Plot Gene Expression
#'
#' Generate a spatial hex plot for a single gene from a `SpatialExperiment`.
Expand Down Expand Up @@ -736,8 +735,6 @@ make_baseplot <- function(spe, df, to_plot, palette = "Mako", transform_scale =
}




# Check if plot is smoothed
if (smooth) {
smooth_suffix <- "smoothed"
Expand Down
3 changes: 1 addition & 2 deletions docs/LICENSE-text.html

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

3 changes: 1 addition & 2 deletions docs/authors.html

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

8 changes: 4 additions & 4 deletions docs/deps/bootstrap-5.3.1/bootstrap.bundle.min.js

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

2 changes: 1 addition & 1 deletion docs/deps/clipboard.js-2.0.11/clipboard.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
e.oMatchesSelector ||
e.webkitMatchesSelector),
(t.exports = function (t, e) {
for (; t && 9 !== t.nodeType; ) {
for (; t && 9 !== t.nodeType;) {
if ("function" == typeof t.matches && t.matches(e)) return t;
t = t.parentNode;
}
Expand Down
8 changes: 4 additions & 4 deletions docs/deps/jquery-3.6.0/jquery-3.6.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -2408,15 +2408,15 @@
: argument > length
? length
: argument;
for (; --i >= 0; ) {
for (; --i >= 0;) {
matchIndexes.push(i);
}
return matchIndexes;
}),

gt: createPositionalPseudo(function (matchIndexes, length, argument) {
var i = argument < 0 ? argument + length : argument;
for (; ++i < length; ) {
for (; ++i < length;) {
matchIndexes.push(i);
}
return matchIndexes;
Expand Down Expand Up @@ -8099,7 +8099,7 @@
}
}

for (index = timers.length; index--; ) {
for (index = timers.length; index--;) {
if (
timers[index].elem === this &&
(type == null || timers[index].queue === type)
Expand Down Expand Up @@ -8141,7 +8141,7 @@
}

// Look for any active animations, and finish them
for (index = timers.length; index--; ) {
for (index = timers.length; index--;) {
if (timers[index].elem === this && timers[index].queue === type) {
timers[index].anim.stop(true);
timers.splice(index, 1);
Expand Down
18 changes: 8 additions & 10 deletions docs/deps/jquery-3.6.0/jquery-3.6.0.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,11 +1202,11 @@
return e;
}),
lt: ve(function (e, t, n) {
for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r; ) e.push(r);
for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r;) e.push(r);
return e;
}),
gt: ve(function (e, t, n) {
for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r);
for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r);
return e;
}),
},
Expand Down Expand Up @@ -3123,13 +3123,11 @@
l,
c = e.cloneNode(!0),
f = ie(e);
if (
!(
y.noCloneChecked ||
(1 !== e.nodeType && 11 !== e.nodeType) ||
S.isXMLDoc(e)
)
)
if (!(
y.noCloneChecked ||
(1 !== e.nodeType && 11 !== e.nodeType) ||
S.isXMLDoc(e)
))
for (a = ve(c), r = 0, i = (o = ve(e)).length; r < i; r++)
((s = o[r]),
(u = a[r]),
Expand Down Expand Up @@ -4031,7 +4029,7 @@
r = Y.get(this);
if (t) r[t] && r[t].stop && a(r[t]);
else for (t in r) r[t] && r[t].stop && it.test(t) && a(r[t]);
for (t = n.length; t--; )
for (t = n.length; t--;)
n[t].elem !== this ||
(null != i && n[t].queue !== i) ||
(n[t].anim.stop(o), (e = !1), n.splice(t, 1));
Expand Down
10 changes: 5 additions & 5 deletions docs/deps/search-1.0.0/autocomplete.jquery.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@
function g(a) {
var b;
if (!this._callbacks) return this;
for (a = a.split(l); (b = a.shift()); ) delete this._callbacks[b];
for (a = a.split(l); (b = a.shift());) delete this._callbacks[b];
return this;
}
function h(a) {
Expand Down Expand Up @@ -962,8 +962,8 @@
function e() {
if (!h) {
((n = !1), (h = !0));
for (var a = m.length, b = setTimeout(d); a; ) {
for (i = m, m = []; i && ++l < a; ) i[l].run();
for (var a = m.length, b = setTimeout(d); a;) {
for (i = m, m = []; i && ++l < a;) i[l].run();
((l = -1), (a = m.length));
}
((i = null), (l = -1), (h = !1), clearTimeout(b));
Expand Down Expand Up @@ -1069,8 +1069,8 @@
if (!p) {
var a = e(g);
p = !0;
for (var b = o.length; b; ) {
for (n = o, o = []; ++q < b; ) n && n[q].run();
for (var b = o.length; b;) {
for (n = o, o = []; ++q < b;) n && n[q].run();
((q = -1), (b = o.length));
}
((n = null), (p = !1), f(a));
Expand Down
10 changes: 5 additions & 5 deletions docs/deps/search-1.0.0/fuse.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ var e, t;
},
x = this.pattern.length;
if (x > 32) {
for (var L = 0, S = x % 32, w = x - S; L < w; )
for (var L = 0, S = x % 32, w = x - S; L < w;)
(b(this.pattern.substr(L, 32), L), (L += 32));
if (S) {
var _ = x - 32;
Expand Down Expand Up @@ -699,15 +699,15 @@ var e, t;
ignoreLocation: p,
});
if (((x = Math.min(O, x)), (S = m + k), w))
for (var j = 0; j < k; ) ((_[m + j] = 1), (j += 1));
for (var j = 0; j < k;) ((_[m + j] = 1), (j += 1));
}
S = -1;
for (
var I = [], C = 1, E = k + M, $ = 1 << (k - 1), P = 0;
P < k;
P += 1
) {
for (var N = 0, D = E; N < D; ) {
for (var N = 0, D = E; N < D;) {
var z = R(t, {
errors: P,
currentLocation: b + D,
Expand Down Expand Up @@ -1232,13 +1232,13 @@ var e, t;
i < o;
i += 1
) {
for (var c = n[i], a = !1, s = -1; !a && ++s < H; ) {
for (var c = n[i], a = !1, s = -1; !a && ++s < H;) {
var u = G[s],
h = u.isMultiMatch(c);
h && (r.push(new u(h, t)), (a = !0));
}
if (!a)
for (s = -1; ++s < H; ) {
for (s = -1; ++s < H;) {
var f = G[s],
l = f.isSingleMatch(c);
if (l) {
Expand Down
2 changes: 1 addition & 1 deletion docs/deps/search-1.0.0/mark.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@
value: function (e) {
if (e) {
if (3 === e.nodeType)
for (; e.nextSibling && 3 === e.nextSibling.nodeType; )
for (; e.nextSibling && 3 === e.nextSibling.nodeType;)
((e.nodeValue += e.nextSibling.nodeValue),
e.parentNode.removeChild(e.nextSibling));
else this.normalizeTextNode(e.firstChild);
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ test_that("convert human to mouse with valid gene symbols", {
})



ad <- spe_to_ad(spe, assay = "counts")

test_that("spe_to_ad returns an AnnData object", {
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-signature.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ test_that("Immunedeconv models works", {
})



# Test for input validation in build_model
test_that("build_model requires non-null single_cell_obj", {
expect_error(build_model(NULL, method = "rctd"), "Parameter 'single_cell_obj' missing or null, but is required")
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ testthat::test_that("subsetSCE subsets the SingleCellExperiment correctly", {
})



testthat::test_that("Normalization works", {
normalized <- spacedeconv::normalize(sce, method = "cpm", assay = "counts")

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ test_that("Plot Umi Count works", {
})




test_that("Plot_post_abundant works", {
p <- plot_most_abundant(spe, method = "estimate")

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/tmpdir/test-model_and_deconvolute.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ spe <- readRDS(system.file("testdata", "spe.rds", package = "spacedeconv"))
sce <- readRDS(system.file("testdata", "sce.rds", package = "spacedeconv"))




test_that("quanTIseq model and deconvolution in one step works", {
deconv <- spacedeconv::build_and_deconvolute(
single_cell_obj = sce,
Expand Down