-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
112 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
coala 0.1.1.9000 | ||
---------------- | ||
|
||
* Add MCMF summary statistic (). | ||
|
||
|
||
coala 0.1.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#' @importFrom R6 R6Class | ||
stat_mcmf_class <- R6Class("stat_mcmf", inherit = sumstat_class, | ||
private = list( | ||
population = NULL, | ||
req_segsites = TRUE | ||
), | ||
public = list( | ||
initialize = function(name, population) { | ||
assert_that(is.numeric(population)) | ||
assert_that(length(population) == 1) | ||
private$population <- population | ||
super$initialize(name) | ||
}, | ||
calculate = function(seg_sites, trees, files, model) { | ||
calc_mcmf(seg_sites, | ||
get_population_indiviuals(model, private$population), | ||
has_trios(model)) | ||
} | ||
) | ||
) | ||
|
||
#' The MCMF Summary Statistic | ||
#' | ||
#' When adding this to a model, the "Most Common Mutation Frequecy" summary | ||
#' statistic is calculated from the simulation output. | ||
#' | ||
#' @inheritParams sumstat_four_gamete | ||
#' @export | ||
sumstat_mcmf <- function(name = "mcmf", population = 1) { | ||
stat_mcmf_class$new(name, population) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters