R/ti_mpath.R

Defines functions ti_mpath

Documented in ti_mpath

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

#' @title Mpath
#' 
#' @description
#' Will generate a trajectory using [Mpath](https://doi.org/10.1038/ncomms11988).
#' 
#' This method was wrapped inside a
#' [container](https://github.com/dynverse/ti_mpath).
#' The original code of this method is available
#' [here](https://github.com/JinmiaoChenLab/Mpath).
#' 
#' @references Chen, J., Schlitzer, A., Chakarov, S., Ginhoux, F., Poidinger, M.,
#' 2016. Mpath maps multi-branching single-cell trajectories revealing progenitor
#' cell progression during development. Nature Communications 7.
#' 
#' @param distMethod The method for calculating dissimilarity between cells.
#' distMethod can be one of "pearson", "kendall", "spearman" or "euclidean".
#' Default is "euclidean". Domain: {pearson, kendall, spearman, euclidean}.
#' Default: euclidean. Format: character.
#' @param method Method for distinguishing landmark clusters from non-landmark
#' clusters.method can be "kmeans" or "diversity" or "size" or "diversity_size".
#' When method="diversity", numlm needs to be specified. Default is
#' "diversity_size". Domain: {kmeans, diversity, size, diversity_size}. Default:
#' kmeans. Format: character.
#' @param numcluster Number of initial clusters. Domain: U(3, 30). Default: 11.
#' Format: integer.
#' @param numcluster_null If TRUE, will automatically select the number of
#' clusters. Default: TRUE. Format: logical.
#' @param diversity_cut The cutoff value of diversity for differentiating landmark
#' clusters from non-landmark clusters. The diversity of a landmark cluster must
#' be below this cutoff. Domain: U(0.1, 1). Default: 0.6. Format: numeric.
#' @param size_cut The cutoff value of size i.e. number of cells for
#' differentiating landmark clusters from non-landmark clusters. The number of
#' cells in a landmark cluster must be greater than this cutoff. Domain: U(0.01,
#' 1). Default: 0.05. Format: numeric.
#' 
#' @keywords method
#' 
#' @return A TI method wrapper to be used together with
#' \code{\link[dynwrap:infer_trajectories]{infer_trajectory}}
#' @export
ti_mpath <- function(
    distMethod = "euclidean",
    method = "kmeans",
    numcluster = 11L,
    numcluster_null = TRUE,
    diversity_cut = 0.6,
    size_cut = 0.05
) {
  method_choose_backend(
    package_repository = NULL,
    package_name = NULL,
    function_name = NULL,
    package_version = NULL,
    container_id = "dynverse/ti_mpath:v0.9.9.01"
  )(
    distMethod = distMethod,
    method = method,
    numcluster = numcluster,
    numcluster_null = numcluster_null,
    diversity_cut = diversity_cut,
    size_cut = size_cut
  )
}
dynverse/dynmethods documentation built on Jan. 18, 2024, 4:44 a.m.