R/ti_merlot.R

Defines functions ti_merlot

Documented in ti_merlot

######################################### DO NOT EDIT! #########################################
#### This file is automatically generated from data-raw/2-generate_r_code_from_containers.R ####
################################################################################################

#' @title MERLoT
#' 
#' @description
#' Will generate a trajectory using [MERLoT](https://doi.org/10.1101/261768).
#' 
#' This method was wrapped inside a
#' [container](https://github.com/dynverse/ti_merlot).
#' The original code of this method is available
#' [here](https://github.com/soedinglab/merlot).
#' 
#' @references Parra, R.G., Papadopoulos, N., Ahumada-Arranz, L., Kholtei, J.E.,
#' Mottelson, N., Horokhovsky, Y., Treutlein, B., Soeding, J., 2018.
#' Reconstructing complex lineage trees from scRNA-seq data using MERLoT.
#' 
#' @param sigma Diffusion scale parameter of the Gaussian kernel. A larger sigma
#' might be necessary if the eigenvalues can not be found because of a singularity
#' in the matrix. Must a character vector -- `"local"` (default) or `"global"`.
#' Domain: {local, global}. Default: local. Format: character.
#' @param distance A character vector specifying which distance metric to use.
#' Allowed measures are the Euclidean distance (default), the cosine distance
#' (`1-corr(c_1, c_2)`), or the rank correlation distance (`1-corr(rank(c_1),
#' rank(c_2))`). Domain: {euclidean, cosine, rankcor}. Default: euclidean. Format:
#' character.
#' @param ndim Number of eigenvectors/dimensions to return. Domain: U(2, 20).
#' Default: 20. Format: integer.
#' @param density_norm Logical. If TRUE, use density normalisation. Default: TRUE.
#' Format: logical.
#' @param n_local If sigma == 'local', the `n_local` nearest neighbor(s)
#' determine(s) the local sigma. Domain: ( U(2, 20), U(2, 20) ). Default: (5, 7).
#' Format: integer_range.
#' @param w_width Window width to use for deciding the branch cutoff. Domain:
#' e^U(-9.21, 0.00). Default: 0.01. Format: numeric.
#' @param n_components_to_use Which components to use in downstream analysis.
#' Domain: U(2, 20). Default: 3. Format: integer.
#' @param N_yk Number of nodes for the elastic principal tree. Domain: U(2, 1000).
#' Default: 100. Format: integer.
#' @param lambda_0 Principal elastic tree energy function parameter. Domain:
#' e^U(-27.63, -13.82). Default: 8e-10. Format: numeric.
#' @param mu_0 Principal elastic tree energy function parameter. Domain: U(5e-04,
#' 0.005). Default: 0.0025. Format: numeric.
#' @param increaseFactor_mu Factor by which the mu will be increased for the
#' embedding. Domain: U(2, 50). Default: 20. Format: numeric.
#' @param increaseFactor_lambda Factor by which the mu will be increased for the
#' embedding. Domain: U(2, 50). Default: 20. Format: numeric.
#' @param FixEndpoints Documentation not provided by authors. Default: FALSE.
#' Format: logical.
#' 
#' @keywords method
#' 
#' @return A TI method wrapper to be used together with
#' \code{\link[dynwrap:infer_trajectories]{infer_trajectory}}
#' @export
ti_merlot <- function(
    sigma = "local",
    distance = "euclidean",
    ndim = 20L,
    density_norm = TRUE,
    n_local = c(5L, 7L),
    w_width = 0.01,
    n_components_to_use = 3L,
    N_yk = 100L,
    lambda_0 = 8e-10,
    mu_0 = 0.0025,
    increaseFactor_mu = 20L,
    increaseFactor_lambda = 20L,
    FixEndpoints = FALSE
) {
  method_choose_backend(
    package_repository = NULL,
    package_name = NULL,
    function_name = NULL,
    package_version = NULL,
    container_id = "dynverse/ti_merlot:v0.9.9.01"
  )(
    sigma = sigma,
    distance = distance,
    ndim = ndim,
    density_norm = density_norm,
    n_local = n_local,
    w_width = w_width,
    n_components_to_use = n_components_to_use,
    N_yk = N_yk,
    lambda_0 = lambda_0,
    mu_0 = mu_0,
    increaseFactor_mu = increaseFactor_mu,
    increaseFactor_lambda = increaseFactor_lambda,
    FixEndpoints = FixEndpoints
  )
}
dynverse/dynmethods documentation built on Jan. 18, 2024, 4:44 a.m.