Start to use .data pronoun to avoid NOTES about dplyr syntax. This likely ends use of this package for R <= 3.5.
... | ... |
@@ -2,7 +2,7 @@ Type: Package |
2 | 2 |
Package: CellaRepertorium |
3 | 3 |
Title: Data structures, clustering and testing for single |
4 | 4 |
cell immune receptor repertoires (scRNAseq RepSeq/AIRR-seq) |
5 |
-Version: 0.99.0 |
|
5 |
+Version: 0.99.1 |
|
6 | 6 |
Authors@R: |
7 | 7 |
c(person(given = "Andrew", |
8 | 8 |
family = "McDavid", |
... | ... |
@@ -27,7 +27,7 @@ Description: Methods to cluster and analyze high-throughput |
27 | 27 |
hypergeometric models. |
28 | 28 |
License: GPL-3 |
29 | 29 |
Depends: |
30 |
- R (>= 3.5.0) |
|
30 |
+ R (>= 4.0) |
|
31 | 31 |
Imports: |
32 | 32 |
dplyr, |
33 | 33 |
tibble, |
... | ... |
@@ -36,7 +36,7 @@ Imports: |
36 | 36 |
Rcpp, |
37 | 37 |
reshape2, |
38 | 38 |
methods, |
39 |
- rlang, |
|
39 |
+ rlang (>= 0.3), |
|
40 | 40 |
purrr, |
41 | 41 |
Matrix, |
42 | 42 |
S4Vectors, |
... | ... |
@@ -62,6 +62,7 @@ importFrom(methods,new) |
62 | 62 |
importFrom(methods,slot) |
63 | 63 |
importFrom(methods,validObject) |
64 | 64 |
importFrom(rlang,":=") |
65 |
+importFrom(rlang,.data) |
|
65 | 66 |
importFrom(rlang,sym) |
66 | 67 |
importFrom(rlang,syms) |
67 | 68 |
importFrom(stats,as.dist) |
... | ... |
@@ -78,4 +79,5 @@ importFrom(tibble,as_tibble) |
78 | 79 |
importFrom(tibble,data_frame) |
79 | 80 |
importFrom(tibble,tibble) |
80 | 81 |
importFrom(utils,data) |
82 |
+importFrom(utils,packageVersion) |
|
81 | 83 |
useDynLib(CellaRepertorium) |
... | ... |
@@ -7,6 +7,7 @@ |
7 | 7 |
#' |
8 | 8 |
#' @return object representing the filtration (currently a list) |
9 | 9 |
#' @export |
10 |
+#' @importFrom rlang .data |
|
10 | 11 |
#' |
11 | 12 |
#' @examples |
12 | 13 |
#' cluster_filterset(min_number = 1, min_freq = 0) |
... | ... |
@@ -25,9 +26,11 @@ cluster_filterset = function(min_number = 0, min_freq = 0, white_list = NULL){ |
25 | 26 |
canon = canonicalize_cell(ccdb, |
26 | 27 |
contig_filter_args = !!rlang::enexpr(contig_filter_args), |
27 | 28 |
tie_break_keys, overwrite = TRUE, contig_fields = contig_fields) |
28 |
- count = canon$cell_tbl %>% group_by(!!!syms(ccdb$cluster_pk)) %>% summarize(n = dplyr::n(), freq = n/nrow(canon$cell_tbl)) |
|
29 |
+ count = canon$cell_tbl |
|
30 |
+ count = count %>% group_by(!!!syms(ccdb$cluster_pk)) |
|
31 |
+ count = count %>% summarize(n = dplyr::n(), freq = .data$n/nrow(canon$cell_tbl)) |
|
29 | 32 |
if(!is.null(filterset$white_list)) count = semi_join(count, filterset$white_list, by = ccdb$cluster_pk) |
30 |
- filter(count, n >= filterset$min_number, freq >= filterset$min_freq) |
|
33 |
+ filter(count, .data$n >= filterset$min_number, .data$freq >= filterset$min_freq) |
|
31 | 34 |
} |
32 | 35 |
|
33 | 36 |
#' @describeIn cluster_logistic_test split `ccdb` and conduct tests within strata |
... | ... |
@@ -55,7 +58,7 @@ cluster_test_by = function(ccdb, fields = 'chain', tbl = 'cluster_tbl', ...){ |
55 | 58 |
#' @return table with one row per cluster/term. |
56 | 59 |
#' @export |
57 | 60 |
#' @importFrom stats as.formula |
58 |
-#' |
|
61 |
+#' @importFrom utils packageVersion |
|
59 | 62 |
#' @examples |
60 | 63 |
#' library(dplyr) |
61 | 64 |
#' data(ccdb_ex) |
... | ... |
@@ -236,18 +236,6 @@ pairing_tables = function(ccdb, canonicalize_fun = canonicalize_by_chain, table |
236 | 236 |
|
237 | 237 |
} |
238 | 238 |
|
239 |
-plot_pairing = function(pairing_list, color_labels_by){ |
|
240 |
- pl = pairing_list |
|
241 |
- pairs_plt = ggplot(pairing_list$cell_tbl, aes(x = cluster_idx.1_fct, y = cluster_idx.2_fct, color = sample, shape = pop)) + geom_jitter(width = .3, height = .3) |
|
242 |
- |
|
243 |
- ylab = tibble(!!color_labels_by := ggplot_build(pairs_plt)$layout$panel_params[[1]]$y.label) %>% left_join(feature_tbl) %>% mutate(class_color = ifelse(is.na(class_color), '#E41A1C', class_color)) |
|
244 |
- |
|
245 |
- xlab = tibble(!!color_labels_by := ggplot_build(pairs_plt)$layout$panel_params[[1]]$x.label) %>% left_join(feature_tbl) %>% mutate(class_color = ifelse(is.na(class_color), '#E41A1C', class_color)) |
|
246 |
- |
|
247 |
- pairs_plt = pairs_plt + theme(axis.text.x = element_text(angle = 90, color = xlab$class_color, size = 8), axis.text.y = element_text(color = ylab$class_color, size = 8)) |
|
248 |
- |
|
249 |
- |
|
250 |
-} |
|
251 | 239 |
|
252 | 240 |
#' @export |
253 | 241 |
#' @describeIn enumerate_pairing Recode a table with IG chains |