Skip to content

Commit

Permalink
Removed here from dependencies, using where() from tidyselect and not…
Browse files Browse the repository at this point in the history
… dplyr
  • Loading branch information
oliviaAB committed Apr 16, 2024
1 parent 6774309 commit 02ad30a
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 13 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: moiraine
Title: Construction of Reproducible Pipelines for Testing and Comparing Multi-omics Integration Tools
Version: 1.0.0
Version: 1.0.0.9000
Authors@R:
c(person("Olivia", "Angelin-Bonnet",
email = "[email protected]",
Expand Down Expand Up @@ -30,7 +30,6 @@ Imports:
ggpubr,
ggrepel,
grid,
here,
methods,
mixOmics,
MOFA2,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,4 @@ importClassesFrom(Biobase,SnpSet)
importClassesFrom(Biobase,eSet)
importClassesFrom(MultiDataSet,MultiDataSet)
importFrom(dplyr,sym)
importFrom(dplyr,where)
importFrom(ggplot2,aes)
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# moiraine (development version)

- In `comparison_heatmap_corr()`, the user can now choose the legend position through the `legend_position` parameter.

- Package here has been removed from dependencies (not needed).

- `where()` function now imported from tidyselect instead of dplyr (as it required a newer version of dplyr).
5 changes: 4 additions & 1 deletion R/data_import.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ import_fmetadata_gff <- function(file, feature_type, add_fields = NULL) {
## become vector
tibble::as_tibble() |>
dplyr::mutate(
dplyr::across(where(is.list), ~ sapply(.x, paste, collapse = " "))
dplyr::across(
tidyselect::where(is.list),
~ sapply(.x, paste, collapse = " ")
)
)

.check_names(
Expand Down
2 changes: 1 addition & 1 deletion R/diablo.R
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ diablo_table_optim_keepX <- function(tune_res) {
)
}) |>
purrr::reduce(dplyr::bind_rows) |>
dplyr::mutate(Total = rowSums(dplyr::across(where(is.numeric))))
dplyr::mutate(Total = rowSums(dplyr::across(tidyselect::where(is.numeric))))

return(res)
}
Expand Down
2 changes: 1 addition & 1 deletion R/import_from_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NULL
#' @import methods
NULL

#' @importFrom dplyr sym where
#' @importFrom dplyr sym
NULL

#' @importFrom ggplot2 aes
Expand Down
4 changes: 2 additions & 2 deletions R/multidataset_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ join_features_metadata <- function(df, mo_data) {
dplyr::filter(feature_id %in% df$feature_id) |>
dplyr::select(
feature_id,
where(~ any(!is.na(.x)))
tidyselect::where(~ any(!is.na(.x)))
)

if (nrow(fmeta) == 0) {
Expand Down Expand Up @@ -285,7 +285,7 @@ join_samples_metadata <- function(df, mo_data, datasets = NULL) {
dplyr::filter(id %in% df$id) |>
dplyr::select(
id,
where(~ any(!is.na(.x)))
tidyselect::where(~ any(!is.na(.x)))
)

if (nrow(smeta) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/output_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ plot_features_weight_covariate <- function(method_output,
) |>
dplyr::mutate(
dplyr::across(
.cols = dplyr::where(\(x){!is.numeric(x)}),
.cols = tidyselect::where(\(x){!is.numeric(x)}),
.fns = as.character
)
),
Expand Down
2 changes: 1 addition & 1 deletion R/so2pls.R
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ so2pls_print_cv_sparsity <- function(cv_res_optim) {
names_from = joint_component,
values_from = n_features
) |>
dplyr::mutate(Total = rowSums(dplyr::across(where(is.numeric))))
dplyr::mutate(Total = rowSums(dplyr::across(tidyselect::where(is.numeric))))
}

#' Plot sparsity cross-validation results for sO2PLS
Expand Down
6 changes: 3 additions & 3 deletions man/diablo_plot_tune.Rd

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

0 comments on commit 02ad30a

Please sign in to comment.