Skip to content

Commit

Permalink
cleanup: drop reshape2 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kdreval committed Mar 14, 2024
1 parent 4d411de commit 03881d6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Imports:
ggthemes,
philentropy,
readr,
reshape2,
stringr,
tibble,
tidyr,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import(workflowr)
importFrom(dplyr,left_join)
importFrom(ggthemes,theme_foundation)
importFrom(philentropy,KL)
importFrom(reshape2,melt)
importFrom(stats,end)
importFrom(stats,quantile)
importFrom(stats,start)
Expand Down
1 change: 0 additions & 1 deletion R/GAMBLR.helpers-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
## usethis namespace: start
#' @importFrom dplyr left_join
#' @importFrom philentropy KL
#' @importFrom reshape2 melt
#' @importFrom stats end
#' @importFrom stats quantile
#' @importFrom stats start
Expand Down
25 changes: 20 additions & 5 deletions R/get_unmatched_normals.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@
#'
#' @return data frame
#'
#' @import dplyr tidyr tibble
#' @export
get_unmatched_normals = function(seq_type_filter){
a = check_config_value(config::get("unmatched_normal_ids"))
df = melt(a,value.name="normal_sample_id") %>%
rename(c("genome_build"="L3","seq_type"="L2","unix_group"="L1")) %>%
dplyr::filter(seq_type == seq_type_filter)
return(df)
a <- check_config_value(config::get("unmatched_normal_ids"))
df <- a %>%
as.data.frame(
check.names = FALSE
) %>%
t %>%
as.data.frame() %>%
tibble::rownames_to_column("rownames") %>%
tidyr::separate(
rownames,
into = c("unix_group", "seq_type", "genome_build"),
sep = "\\."
) %>%
dplyr::select(
"normal_sample_id" = "V1",
genome_build, seq_type, unix_group
) %>%
dplyr::filter(seq_type == seq_type_filter)
return(df)
}

0 comments on commit 03881d6

Please sign in to comment.