Skip to content

Commit

Permalink
can use dplyr instead of tidyselect
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed May 6, 2024
1 parent bb85163 commit 327f170
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ Suggests:
scales,
sigrap,
testthat (>= 3.0.0),
tibble,
tidyselect,
tibble
Roxygen: list(markdown = TRUE,
roclets = c("namespace", "rd", "roxytest::testthat_roclet"))
biocViews:
Expand Down
4 changes: 2 additions & 2 deletions R/purple.R
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ purple_purity_read <- function(x) {

purple_purity <- purple_purity |>
dplyr::mutate(
dplyr::across(tidyselect::where(is.numeric), \(x) round(x, 2)),
dplyr::across(dplyr::where(is.numeric), \(x) round(x, 2)),
dplyr::across(dplyr::everything(), as.character)
) |>
tidyr::pivot_longer(dplyr::everything(), names_to = "column", values_to = "value") |>
Expand Down Expand Up @@ -745,7 +745,7 @@ purple_kataegis <- function(x) {

data <- d$data |>
dplyr::filter(!is.na(.data$KT)) |>
dplyr::select(c("CHROM", "POS", tidyselect::all_of(info_cols)))
dplyr::select(c("CHROM", "POS", dplyr::all_of(info_cols)))

description <- d$description |>
dplyr::filter(.data$ID %in% info_cols) |>
Expand Down
4 changes: 2 additions & 2 deletions R/sv.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ split_double_col <- function(d, nms) {
assertthat::assert_that(is.character(nms))

outd <- d |>
dplyr::select(tidyselect::all_of(nms)) |>
dplyr::select(dplyr::all_of(nms)) |>
dplyr::mutate(num = dplyr::row_number()) |>
tidyr::pivot_longer(cols = tidyselect::all_of(nms), names_to = "col_nm", values_to = "x1_x2") |>
tidyr::pivot_longer(cols = dplyr::all_of(nms), names_to = "col_nm", values_to = "x1_x2") |>
tidyr::separate(.data$x1_x2, into = c("x1", "x2"), sep = ",", fill = "right") |>
dplyr::mutate(
x1 = round(as.double(.data$x1), 2),
Expand Down
2 changes: 0 additions & 2 deletions conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ requirements:
- r-scales
- r-testthat
- r-tibble
- r-tidyselect

run:
- r-base
Expand Down Expand Up @@ -73,7 +72,6 @@ requirements:
- r-scales
- r-testthat
- r-tibble
- r-tidyselect

test:
commands:
Expand Down

0 comments on commit 327f170

Please sign in to comment.