Skip to content

Commit

Permalink
reverting back iterative imputation (error imputation per allele) + r…
Browse files Browse the repository at this point in the history
…emoving mode-based imputation for diploid biallelic loci
  • Loading branch information
jeffersonfparil committed Jan 17, 2024
1 parent 6dbafd5 commit 422e31d
Show file tree
Hide file tree
Showing 9 changed files with 258 additions and 609 deletions.
2 changes: 1 addition & 1 deletion R/extendr-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @useDynLib imputef, .registration = TRUE
NULL

impute <- function(fname, imputation_method, min_coverage, min_allele_frequency, max_missingness_rate_per_locus, pool_sizes, min_depth_below_which_are_missing, max_depth_above_which_are_missing, frac_top_missing_pools, frac_top_missing_loci, min_loci_corr, max_pool_dist, min_l_loci, min_k_neighbours, restrict_linked_loci_per_chromosome, optimise_n_steps_min_loci_corr, optimise_n_steps_max_pool_dist, optimise_n_steps_min_l_loci, optimise_n_steps_min_k_neighbours, optimise_max_l_loci, optimise_max_k_neighbours, optimise_n_reps, n_threads, fname_out_prefix) .Call(wrap__impute, fname, imputation_method, min_coverage, min_allele_frequency, max_missingness_rate_per_locus, pool_sizes, min_depth_below_which_are_missing, max_depth_above_which_are_missing, frac_top_missing_pools, frac_top_missing_loci, min_loci_corr, max_pool_dist, min_l_loci, min_k_neighbours, restrict_linked_loci_per_chromosome, optimise_n_steps_min_loci_corr, optimise_n_steps_max_pool_dist, optimise_n_steps_min_l_loci, optimise_n_steps_min_k_neighbours, optimise_max_l_loci, optimise_max_k_neighbours, optimise_n_reps, n_threads, fname_out_prefix)
impute <- function(fname, imputation_method, min_coverage, min_allele_frequency, max_missingness_rate_per_locus, pool_sizes, min_depth_below_which_are_missing, max_depth_above_which_are_missing, frac_top_missing_pools, frac_top_missing_loci, min_loci_corr, max_pool_dist, min_l_loci, min_k_neighbours, restrict_linked_loci_per_chromosome, optimise_n_steps_min_loci_corr, optimise_n_steps_max_pool_dist, optimise_max_l_loci, optimise_max_k_neighbours, optimise_n_reps, n_threads, fname_out_prefix) .Call(wrap__impute, fname, imputation_method, min_coverage, min_allele_frequency, max_missingness_rate_per_locus, pool_sizes, min_depth_below_which_are_missing, max_depth_above_which_are_missing, frac_top_missing_pools, frac_top_missing_loci, min_loci_corr, max_pool_dist, min_l_loci, min_k_neighbours, restrict_linked_loci_per_chromosome, optimise_n_steps_min_loci_corr, optimise_n_steps_max_pool_dist, optimise_max_l_loci, optimise_max_k_neighbours, optimise_n_reps, n_threads, fname_out_prefix)


# nolint end
12 changes: 0 additions & 12 deletions R/imputef.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ mvi = function(fname,
restrict_linked_loci_per_chromosome=FALSE,
optimise_n_steps_min_loci_corr=0,
optimise_n_steps_max_pool_dist=0,
optimise_n_steps_min_l_loci=0,
optimise_n_steps_min_k_neighbours=0,
optimise_max_l_loci=0,
optimise_max_k_neighbours=0,
optimise_n_reps=0,
Expand Down Expand Up @@ -119,8 +117,6 @@ mvi = function(fname,
#' restrict_linked_loci_per_chromosome=TRUE,
#' optimise_n_steps_min_loci_corr=1,
#' optimise_n_steps_max_pool_dist=1,
#' optimise_n_steps_min_l_loci=1,
#' optimise_n_steps_min_k_neighbours=1,
#' optimise_max_l_loci=100,
#' optimise_max_k_neighbours=50,
#' optimise_n_reps=1,
Expand Down Expand Up @@ -158,10 +154,6 @@ mvi = function(fname,
#' Number of steps requested for the values of minimum linked loci correlation to be used in optimisation. Note that this is an approximate number of steps because it can be more or less, depending on how even the range of possible values can be divided. If set to the default of 1, then no optimisation will be performed. [Default=1]
#' @param optimise_n_steps_max_pool_dist
#' Number of steps requested for the values of maximum genetic distance to be used in optimisation. Note that this is an approximate number of steps because it can be more or less, depending on how even the range of possible values can be divided. If set to the default of 1, then no optimisation will be performed. [Default=1]
#' @param optimise_n_steps_min_l_loci
#' Number of steps requested for the values of minimum number of linked loci to be used in optimisation. Note that this is an approximate number of steps because it can be more or less, depending on how even the range of possible values can be divided. If set to the default of 1, then no optimisation will be performed. [Default=1]
#' @param optimise_n_steps_min_k_neighbours
#' Number of steps requested for the values of minimum number of nearest neighbours to be used in optimisation. Note that this is an approximate number of steps because it can be more or less, depending on how even the range of possible values can be divided. If set to the default of 1, then no optimisation will be performed. [Default=1]
#' @param optimise_max_l_loci
#' Maximum number of linked loci to be tested, if optimising for the best number of linked loci to include in imputation. Minimum value of 2. [Default=100]
#' @param optimise_max_k_neighbours
Expand Down Expand Up @@ -218,8 +210,6 @@ aldknni = function(fname,
restrict_linked_loci_per_chromosome=TRUE,
optimise_n_steps_min_loci_corr=1,
optimise_n_steps_max_pool_dist=1,
optimise_n_steps_min_l_loci=1,
optimise_n_steps_min_k_neighbours=1,
optimise_max_l_loci=100,
optimise_max_k_neighbours=50,
optimise_n_reps=1,
Expand All @@ -242,8 +232,6 @@ aldknni = function(fname,
restrict_linked_loci_per_chromosome=restrict_linked_loci_per_chromosome,
optimise_n_steps_min_loci_corr=optimise_n_steps_min_loci_corr,
optimise_n_steps_max_pool_dist=optimise_n_steps_max_pool_dist,
optimise_n_steps_min_l_loci=optimise_n_steps_min_l_loci,
optimise_n_steps_min_k_neighbours=optimise_n_steps_min_k_neighbours,
optimise_max_l_loci=optimise_max_l_loci,
optimise_max_k_neighbours=optimise_max_k_neighbours,
optimise_n_reps=optimise_n_reps,
Expand Down
6 changes: 0 additions & 6 deletions man/aldknni.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 422e31d

Please sign in to comment.