Skip to content

Commit e48517b

Browse files
committed
Fix bug no default min_cells some functions
1 parent 65cd140 commit e48517b

18 files changed

Lines changed: 27 additions & 25 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ VignetteBuilder:
6363
knitr
6464
Remotes:
6565
github::saeyslab/nichenetr
66-
RoxygenNote: 7.2.3
66+
RoxygenNote: 7.3.1

R/condition_specific_celltypes.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' batches = NA
2424
#' contrasts_oi = c("'High-Low','Low-High'")
2525
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
26-
#'
26+
#' min_cells = 10
2727
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
2828
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
2929
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -251,7 +251,7 @@ generate_prioritization_tables_condition_specific_celltypes_sender = function(se
251251
#' batches = NA
252252
#' contrasts_oi = c("'High-Low','Low-High'")
253253
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
254-
#'
254+
#' min_cells = 10
255255
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
256256
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
257257
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -482,7 +482,7 @@ generate_prioritization_tables_condition_specific_celltypes_receiver = function(
482482
#' batches = NA
483483
#' contrasts_oi = c("'High-Low','Low-High'")
484484
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
485-
#'
485+
#' min_cells = 10
486486
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
487487
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
488488
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -649,7 +649,7 @@ prioritize_condition_specific_sender <- function(
649649
#' batches = NA
650650
#' contrasts_oi = c("'High-Low','Low-High'")
651651
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
652-
#'
652+
#' min_cells = 10
653653
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
654654
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
655655
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))

R/expression_processing.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ process_info_to_ic = function(info_object, ic_type = "sender", lr_network){
786786
#' sample_id = "tumor"
787787
#' group_id = "pEMT"
788788
#' celltype_id = "celltype"
789+
#' min_cells = 10
789790
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
790791
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
791792
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% dplyr::distinct(sample_id , group_id ))

R/lr_target_correlation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#' batches = NA
3333
#' contrasts_oi = c("'High-Low','Low-High'")
3434
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
35-
#'
35+
#' min_cells = 10
3636
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
3737
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
3838
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))

R/pipeline_wrappers.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @title get_abundance_info
22
#'
33
#' @description \code{get_abundance_info} Visualize cell type abundances.
4-
#' @usage get_abundance_info(sce, sample_id, group_id, celltype_id, min_cells, senders_oi, receivers_oi, batches = NA)
4+
#' @usage get_abundance_info(sce, sample_id, group_id, celltype_id, min_cells = 10, senders_oi, receivers_oi, batches = NA)
55
#'
66
#' @inheritParams multi_nichenet_analysis
77
#' @inheritParams combine_sender_receiver_info_ic
@@ -27,7 +27,7 @@
2727
#'
2828
#' @export
2929
#'
30-
get_abundance_info = function(sce, sample_id, group_id, celltype_id, min_cells, senders_oi, receivers_oi, batches = NA){
30+
get_abundance_info = function(sce, sample_id, group_id, celltype_id, min_cells = 10, senders_oi, receivers_oi, batches = NA){
3131

3232
requireNamespace("dplyr")
3333
requireNamespace("ggplot2")
@@ -211,7 +211,7 @@ get_abundance_info = function(sce, sample_id, group_id, celltype_id, min_cells,
211211
#' @title process_abundance_expression_info
212212
#'
213213
#' @description \code{process_abundance_expression_info} Visualize cell type abundances. Calculate the average and fraction of expression of each gene per sample and per group. Calculate relative abundances of cell types as well. Under the hood, the following functions are used: `get_avg_frac_exprs_abund`, `process_info_to_ic`, `combine_sender_receiver_info_ic`
214-
#' @usage process_abundance_expression_info(sce, sample_id, group_id, celltype_id, min_cells, senders_oi, receivers_oi, lr_network, batches = NA, frq_list, abundance_info)
214+
#' @usage process_abundance_expression_info(sce, sample_id, group_id, celltype_id, min_cells = 10, senders_oi, receivers_oi, lr_network, batches = NA, frq_list, abundance_info)
215215
#'
216216
#' @inheritParams multi_nichenet_analysis
217217
#' @inheritParams combine_sender_receiver_info_ic
@@ -243,7 +243,7 @@ get_abundance_info = function(sce, sample_id, group_id, celltype_id, min_cells,
243243
#'
244244
#' @export
245245
#'
246-
process_abundance_expression_info = function(sce, sample_id, group_id, celltype_id, min_cells, senders_oi, receivers_oi, lr_network, batches = NA, frq_list, abundance_info){
246+
process_abundance_expression_info = function(sce, sample_id, group_id, celltype_id, min_cells = 10, senders_oi, receivers_oi, lr_network, batches = NA, frq_list, abundance_info){
247247

248248
requireNamespace("dplyr")
249249
requireNamespace("ggplot2")

R/prioritization.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ scale_quantile_adapted = function(x, outlier_cutoff = 0){
3737
#' batches = NA
3838
#' contrasts_oi = c("'High-Low','Low-High'")
3939
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
40-
#'
40+
#' min_cells = 10
4141
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
4242
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
4343
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -273,7 +273,7 @@ generate_prioritization_tables = function(sender_receiver_info, sender_receiver_
273273
#' batches = NA
274274
#' contrasts_oi = c("'High-Low','Low-High'")
275275
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
276-
#'
276+
#' min_cells = 10
277277
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
278278
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
279279
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -381,7 +381,7 @@ get_top_n_lr_pairs = function(prioritization_tables, top_n, groups_oi = NULL, se
381381
#' batches = NA
382382
#' contrasts_oi = c("'High-Low','Low-High'")
383383
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
384-
#'
384+
#' min_cells = 10
385385
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
386386
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
387387
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))
@@ -672,7 +672,7 @@ generate_prioritization_tables_tests = function(sender_receiver_info, sender_rec
672672
#' batches = NA
673673
#' contrasts_oi = c("'High-Low','Low-High'")
674674
#' contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
675-
#'
675+
#' min_cells = 10
676676
#' metadata_abundance = SummarizedExperiment::colData(sce)[,c(sample_id, group_id, celltype_id)]
677677
#' colnames(metadata_abundance) =c("sample_id", "group_id", "celltype_id")
678678
#' abundance_data = metadata_abundance %>% tibble::as_tibble() %>% dplyr::group_by(sample_id , celltype_id) %>% dplyr::count() %>% dplyr::inner_join(metadata_abundance %>% tibble::as_tibble() %>% dplyr::distinct(sample_id , group_id ))

man/add_extra_criterion.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_prioritization_tables.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_prioritization_tables_condition_specific_celltypes_receiver.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_prioritization_tables_condition_specific_celltypes_sender.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)