Skip to content

Commit

Permalink
Update evodynamics.R
Browse files Browse the repository at this point in the history
  • Loading branch information
Militeee authored Sep 21, 2023
1 parent 623c91e commit 61bb3e5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/evodynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -632,19 +632,19 @@ get_genome_length = function(fit, exome = FALSE, build = "hg38", karyotypes = NU
s_posterior = function(fit,N_max,ncells = 1,u = 0,sigma = 1){


if(class(fit$best) == "dbpmmh"){
if(class(fit) == "dbpmmh"){

m = fit$best$data %>% filter(cluster == 'S1',karyotype == "1:1") %>% nrow()
mu = mu_posterior(fit$best,ncells = ncells) %>% pull(mean)
ccf = (fit$best$data %>% filter(cluster == 'S1',karyotype == "1:1") %>% pull(VAF) %>% mean())*2
length_diploid_genome = get_genome_length(fit$best) %>% filter(karyotype == "1:1") %>%
m = fit$data %>% filter(cluster == 'S1',karyotype == "1:1") %>% nrow()
mu = mu_posterior(fit,ncells = ncells) %>% pull(mean)
ccf = (fit$data %>% filter(cluster == 'S1',karyotype == "1:1") %>% pull(VAF) %>% mean())*2
length_diploid_genome = get_genome_length(fit) %>% filter(karyotype == "1:1") %>%
pull(length)

}else{

m = fit$best$data %>% filter(cluster == 'C2') %>% nrow()
m = fit$data %>% filter(cluster == 'C2') %>% nrow()
mu = mutationrate(fit,ncells = ncells)/(2*3*10^9)
ccf = (fit$best$data %>% filter(cluster == 'C2') %>% pull(VAF) %>% mean())*2
ccf = (fit$data %>% filter(cluster == 'C2') %>% pull(VAF) %>% mean())*2
length_diploid_genome = 3*10^9

}
Expand Down

0 comments on commit 61bb3e5

Please sign in to comment.