R/ti_oscope.R

Defines functions ti_oscope

Documented in ti_oscope

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

#' @title Oscope
#' 
#' @description
#' Will generate a trajectory using [Oscope](https://doi.org/10.1038/nmeth.3549).
#' 
#' This method was wrapped inside a
#' [container](https://github.com/dynverse/ti_oscope).
#' The original code of this method is available
#' [here](https://bioconductor.org/packages/release/bioc/html/Oscope.html).
#' 
#' @references Leng, N., Chu, L.-F., Barry, C., Li, Y., Choi, J., Li, X., Jiang,
#' P., Stewart, R.M., Thomson, J.A., Kendziorski, C., 2015. Oscope identifies
#' oscillatory genes in unsynchronized single-cell RNA-seq experiments. Nature
#' Methods 12, 947–950.
#' 
#' @param alternative_median If alternative = TRUE, the alternative version of
#' median normalization will be applied.The alternative method is similar to
#' median-by-ratio normalization, but can deal withthe cases when all of the
#' genes/isoforms have at least one zero counts (in which casethe median-by-ratio
#' normalization will fail). Default: FALSE. Format: logical.
#' @param filter_genes Whether or not to filter the genes using the CalcMV
#' function. Default: TRUE. Format: logical.
#' @param mean_cut It is suggested to apply Oscope on genes with high mean and
#' high variance.By default, the lower boundary is specified as 100, consequently
#' only geneswith mean > 100 will be used. The CalcMV function will fit a linear
#' regressionon log(variance)~log(mean) on these genes. Genes with variance above
#' thisline are considered as the high mean high variance genes. Domain: (
#' e^U(2.30, 4.61), e^U(4.61, 18.42) ). Default: (100, 100000000). Format:
#' integer_range.
#' @param qt Thresholds for outlier adjustment. For each gene/isoform, values <=
#' qt1 thquantile (>= qt2 th quantile) will be pushed to qt1 th quantile (qt2 th
#' quantile)prior to the scaling. default values are 0.05 and 0.95. Domain: ( U(0,
#' 1), U(0, 1) ). Default: (0.05, 0.95). Format: numeric_range.
#' @param quan Only gene pairs with similarity score >= quan th quantile will be
#' considered in the clustering analyses. Domain: U(0, 1). Default: 0.95. Format:
#' numeric.
#' @param ndg Degree of polynomial. Domain: U(1, 10). Default: 3. Format: integer.
#' @param nchun Number of starting points for polynomial fitting. Domain: U(1,
#' 10). Default: 4. Format: integer.
#' @param niter The 2-opt algorithm will stop if N iterations has been performed
#' or if the optimal order. Domain: e^U(6.91, 13.82). Default: 20000. Format:
#' integer.
#' @param ncthre No description was found. Domain: e^U(4.61, 11.51). Default:
#' 1000. Format: integer.
#' 
#' @keywords method
#' 
#' @return A TI method wrapper to be used together with
#' \code{\link[dynwrap:infer_trajectories]{infer_trajectory}}
#' @export
ti_oscope <- function(
    alternative_median = FALSE,
    filter_genes = TRUE,
    mean_cut = c(100L, 100000000L),
    qt = c(0.05, 0.95),
    quan = 0.95,
    ndg = 3L,
    nchun = 4L,
    niter = 20000L,
    ncthre = 1000L
) {
  method_choose_backend(
    package_repository = NULL,
    package_name = NULL,
    function_name = NULL,
    package_version = NULL,
    container_id = "dynverse/ti_oscope:v0.1.0"
  )(
    alternative_median = alternative_median,
    filter_genes = filter_genes,
    mean_cut = mean_cut,
    qt = qt,
    quan = quan,
    ndg = ndg,
    nchun = nchun,
    niter = niter,
    ncthre = ncthre
  )
}
dynverse/dynmethods documentation built on Jan. 18, 2024, 4:44 a.m.