diff --git a/R/utils_differentiation.R b/R/utils_differentiation.R index a792ca3..885c4fe 100644 --- a/R/utils_differentiation.R +++ b/R/utils_differentiation.R @@ -28,7 +28,7 @@ get_mrca_df = function(x, edges, highlight=c(), tps=c(), time_spec=F, thr=0, dplyr::filter(Population>thr) %>% dplyr::group_by(Identity) %>% - dplyr::filter(any(Frequency > thr_freq)) %>% + dplyr::filter(any(Frequency >= thr_freq)) %>% dplyr::ungroup() %>% dplyr::select(-Frequency) if (nrow(fracs)==0) { diff --git a/R/utils_mullerplot.R b/R/utils_mullerplot.R index bf52ea0..807053c 100644 --- a/R/utils_mullerplot.R +++ b/R/utils_mullerplot.R @@ -180,7 +180,8 @@ estimate_n_pops = function(x, highlight=c(), vcn=NULL) { n_ISs = get_ISs(x) if (is.null(vcn)) vcn = estimate_mean_ISs(x) - n_pops = sapply(get_unique_labels(x), function(cls) return(max(1, round(n_ISs[[cls]] / vcn))) ) + n_pops = sapply(get_unique_labels(x), + function(cls) return(max(1, round(n_ISs[[cls]] / (vcn+0.1*vcn)))) ) return(n_pops) }