R/ti_paga_tree.R

Defines functions ti_paga_tree

Documented in ti_paga_tree

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

#' @title PAGA Tree
#' 
#' @description
#' Will generate a trajectory using [PAGA
#' Tree](https://doi.org/10.1186/s13059-019-1663-x). This method runs exactly the
#' same as normal PAGA, but will construct a minimal-spanning tree between
#' clusters
#' 
#' This method was wrapped inside a
#' [container](https://github.com/dynverse/ti_paga_tree).
#' The original code of this method is available
#' [here](https://github.com/theislab/graph_abstraction).
#' 
#' @references Wolf, F.A., Hamey, F.K., Plass, M., Solana, J., Dahlin, J.S.,
#' Göttgens, B., Rajewsky, N., Simon, L., Theis, F.J., 2019. PAGA: graph
#' abstraction reconciles clustering with trajectory inference through a topology
#' preserving map of single cells. Genome Biology 20.
#' 
#' @param filter_features Whether to do feature filtering. Default: TRUE. Format:
#' logical.
#' @param n_neighbors Number of neighbours for knn. Domain: U(1, 100). Default:
#' 15. Format: integer.
#' @param n_comps Number of principal components. Domain: U(0, 100). Default: 50.
#' Format: integer.
#' @param n_dcs Number of diffusion components for denoising graph, 0 means no
#' denoising. Domain: U(0, 40). Default: 15. Format: integer.
#' @param resolution Resolution of louvain clustering, which determines the
#' granularity of the clustering. Higher values will result in more clusters.
#' Domain: U(0.1, 10). Default: 1. Format: numeric.
#' @param embedding_type Either 'umap' (scales very well, recommended for very
#' large datasets) or 'fa' (ForceAtlas2, often a bit more intuitive for small
#' datasets). Domain: {umap, fa}. Default: fa. Format: character.
#' 
#' @keywords method
#' 
#' @return A TI method wrapper to be used together with
#' \code{\link[dynwrap:infer_trajectories]{infer_trajectory}}
#' @export
ti_paga_tree <- function(
    filter_features = TRUE,
    n_neighbors = 15L,
    n_comps = 50L,
    n_dcs = 15L,
    resolution = 1L,
    embedding_type = "fa"
) {
  method_choose_backend(
    package_repository = NULL,
    package_name = NULL,
    function_name = NULL,
    package_version = NULL,
    container_id = "dynverse/ti_paga_tree:v0.9.9.06"
  )(
    filter_features = filter_features,
    n_neighbors = n_neighbors,
    n_comps = n_comps,
    n_dcs = n_dcs,
    resolution = resolution,
    embedding_type = embedding_type
  )
}
dynverse/dynmethods documentation built on Jan. 18, 2024, 4:44 a.m.