Skip to content

Commit

Permalink
remove unused cpp functions for hwe
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Jun 16, 2024
1 parent 6054c9b commit 16cf5a0
Show file tree
Hide file tree
Showing 8 changed files with 631 additions and 476 deletions.
8 changes: 0 additions & 8 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ SNPHWE2 <- function(obs_hets, obs_hom1, obs_hom2, midp) {
.Call(`_tidypopgen_SNPHWE2`, obs_hets, obs_hom1, obs_hom2, midp)
}

SNPHWE_t <- function(obs_hets, obs_hom1, obs_hom2, thresh) {
.Call(`_tidypopgen_SNPHWE_t`, obs_hets, obs_hom1, obs_hom2, thresh)
}

SNPHWE_midp_t <- function(obs_hets, obs_hom1, obs_hom2, thresh) {
.Call(`_tidypopgen_SNPHWE_midp_t`, obs_hets, obs_hom1, obs_hom2, thresh)
}

increment_as_counts <- function(k, k2, na_mat, dos_mat, BM, rowInd, colInd) {
invisible(.Call(`_tidypopgen_increment_as_counts`, k, k2, na_mat, dos_mat, BM, rowInd, colInd))
}
Expand Down
1 change: 1 addition & 0 deletions R/vcf_to_fbm.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ vcf_to_fbm <- function(
gt <- vcfR::extract.gt(temp_vcf)
gt <- gt[bi,,drop=FALSE]
if (nrow(gt)>1){
# @TODO we could parallelise here
gt <- t(apply(gt,2,poly_indiv_dosage, max_ploidy=max_ploidy))
} else if (nrow(gt)==1){ # if we only have one marker
gt <- matrix(apply(gt,2,poly_indiv_dosage, max_ploidy=max_ploidy),ncol=1)
Expand Down
Loading

0 comments on commit 16cf5a0

Please sign in to comment.