Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmollina committed Feb 13, 2024
1 parent 5675cc0 commit 4ece3ff
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 34 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export(mf_k)
export(mp_pallet1)
export(mp_pallet2)
export(mp_pallet3)
export(paralell_pairwise_discrete)
export(paralell_pairwise_probability)
export(parallel_block)
export(ph_list_to_matrix)
export(ph_matrix_to_list)
Expand Down
12 changes: 6 additions & 6 deletions R/make_seq.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
#'
#' @return Returns an object of class \code{mappoly.sequence}, comprising:
#' \itemize{
#' \item{\code{seq.num}}{Ordered vector of marker indices according to the input.}
#' \item{\code{seq.phases}}{List of linkage phases between markers; \code{-1} for undefined phases.}
#' \item{\code{seq.rf}}{Vector of recombination frequencies; \code{-1} for unestimated frequencies.}
#' \item{\code{loglike}}{Log-likelihood of the linkage map.}
#' \item{\code{data.name}}{Name of the \code{mappoly.data} object with raw data.}
#' \item{\code{twopt}}{Name of the \code{mappoly.twopt} object with 2-point analyses; \code{-1} if not computed.}
#' \item{seq.num}{Ordered vector of marker indices according to the input.}
#' \item{seq.phases}{List of linkage phases between markers; \code{-1} for undefined phases.}
#' \item{seq.rf}{Vector of recombination frequencies; \code{-1} for not estimated frequencies.}
#' \item{loglike}{Log-likelihood of the linkage map.}
#' \item{data.name}{Name of the \code{mappoly.data} object with raw data.}
#' \item{twopt}{Name of the \code{mappoly.twopt} object with 2-point analyses; \code{-1} if not computed.}
#' }
#'
#' @examples
Expand Down
28 changes: 26 additions & 2 deletions R/pairwise_rf.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,20 @@ est_pairwise_rf <- function(input.seq, count.cache = NULL,
class = "mappoly.twopt"))
}

#' Wrapper function to discrete-based pairwise two-point estimation in C++
#' Parallel Pairwise Discrete Estimation
#'
#' This function performs parallel pairwise estimation of recombination fractions using discrete dosage scoring via a C++ backend.
#' @param mrk.pairs A matrix of dimensions 2*N, containing N pairs of markers to be analyzed.
#' @param input.seq An object of class \code{mappoly.sequence}.
#' @param geno Genotype matrix.
#' @param dP Vector of probabilities for the first allele.
#' @param dQ Vector of probabilities for the second allele.
#' @param count.cache An object of class \code{cache.info} containing pre-computed genotype frequencies.
#' @param tol The tolerance level for the estimation accuracy (default is \code{.Machine$double.eps^0.25}).
#' @param ll Logical; if TRUE, the function returns log-likelihood values instead of LOD scores. For internal use.
#' @return Depending on the \code{ll} parameter, returns either log-likelihood values or formatted LOD scores from pairwise recombination fraction estimation.
#' @keywords internal
#' @export
paralell_pairwise_discrete <- function(mrk.pairs,
input.seq,
geno,
Expand All @@ -273,8 +285,20 @@ paralell_pairwise_discrete <- function(mrk.pairs,
return(lapply(res, format_rf))
}

#' Wrapper function to probability-based pairwise two-point estimation in C++
#' Parallel Pairwise Probability Estimation
#'
#' This function performs parallel pairwise estimation of recombination fractions using probability-based dosage scoring via a C++ backend.
#' @param mrk.pairs A matrix of dimensions 2*N, containing N pairs of markers to be analyzed.
#' @param input.seq An object of class \code{mappoly.sequence}.
#' @param geno Genotype matrix.
#' @param dP Vector of probabilities for the first allele.
#' @param dQ Vector of probabilities for the second allele.
#' @param count.cache An object of class \code{cache.info} containing pre-computed genotype frequencies.
#' @param tol The tolerance level for the estimation accuracy (default is \code{.Machine$double.eps^0.25}).
#' @param ll Logical; if TRUE, the function returns log-likelihood values instead of LOD scores. For internal use.
#' @return Depending on the \code{ll} parameter, returns either log-likelihood values or formatted LOD scores from pairwise recombination fraction estimation.
#' @keywords internal
#' @export
paralell_pairwise_probability <- function(mrk.pairs,
input.seq,
geno,
Expand Down
12 changes: 6 additions & 6 deletions man/make_seq_mappoly.Rd

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

24 changes: 22 additions & 2 deletions man/paralell_pairwise_discrete.Rd

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

24 changes: 22 additions & 2 deletions man/paralell_pairwise_probability.Rd

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

32 changes: 16 additions & 16 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ BEGIN_RCPP
END_RCPP
}

RcppExport SEXP calc_genoprob(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP calc_genoprob_prior(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP calc_genprob_haplo(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP calc_genprob_haplo_highprec(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP calc_genprob_single_parent(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP est_haplotype_map(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP est_haplotype_map_highprec(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP est_hmm_map_single_parent(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP est_map_hmm(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP est_map_hmm_highprec(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP get_counts_single_parent_cpp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP loglike_hmm(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP pairwise_rf_estimation_disc(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP pairwise_rf_estimation_disc_rcpp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP pairwise_rf_estimation_prob(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP poly_hmm_est_CPP(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP calc_genoprob(void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP calc_genoprob_prior(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP calc_genprob_haplo(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP calc_genprob_haplo_highprec(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP calc_genprob_single_parent(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP est_haplotype_map(void *, void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP est_haplotype_map_highprec(void *, void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP est_hmm_map_single_parent(void *, void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP est_map_hmm(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP est_map_hmm_highprec(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP get_counts_single_parent_cpp(void *, void *, void *, void *, void *, void *);
RcppExport SEXP loglike_hmm(void *, void *, void *, void *, void *, void *);
RcppExport SEXP pairwise_rf_estimation_disc(void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP pairwise_rf_estimation_disc_rcpp(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP pairwise_rf_estimation_prob(void *, void *, void *, void *, void *, void *, void *, void *);
RcppExport SEXP poly_hmm_est_CPP(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);

static const R_CallMethodDef CallEntries[] = {
{"_mappoly_vcf_get_probabilities", (DL_FUNC) &_mappoly_vcf_get_probabilities, 2},
Expand Down

0 comments on commit 4ece3ff

Please sign in to comment.