Skip to content

Commit

Permalink
Update plots_coverage.R
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-buscaroli committed Jul 5, 2024
1 parent dc5fecf commit c5a01f8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions R/plots_coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,16 @@ plot_marginal_lineage = function(x, dd, dens.df, show_dens, highlight, binwidth,
#' @export plot_mixture_weights

plot_mixture_weights = function(x, vcn=NULL) {
weights.df = x %>%
get_weights() %>%
data.frame() %>%
tibble::rownames_to_column() %>%
setNames(c("labels","weights"))
# weights.df = x %>%
# get_weights() %>%
# data.frame() %>%
# tibble::rownames_to_column() %>%
# setNames(c("labels","weights"))

weights.df = get_cov_dataframe(x) %>% dplyr::select(IS, labels) %>%
unique() %>% dplyr::group_by(labels) %>%
dplyr::summarise(weights=dplyr::n()) %>%
dplyr::ungroup() %>% dplyr::mutate(weights=weights/sum(weights))

ISs.df = x %>%
get_ISs() %>%
Expand Down

0 comments on commit c5a01f8

Please sign in to comment.