Skip to contents

Estimate Parameters in Single-cell Gene Expression Generalized Trend Model on a List of Genes

Usage

runscGTM(
  t,
  y,
  sce = NULL,
  marginal = "ZIP",
  iter_num = 50,
  seed = 123,
  hill_only,
  mc.cores = 2
)

Arguments

t

A numeric vector of the input normalized pseudotime data of a given gene, length equals the numbers of cells (If sce is not null, t is a string of gene names to use in the model)

y

A tibble, representing the input expression counts of corresponding lists of genes, number of rows equals the numbers of cells, number of columns equals the numbers of targeted genes, (If sce is not null, y is a SingleCellExperiment object with counts data)

sce

A character vector, indicates the assay name applied to the SingleCellExperiment object default=NULL

marginal

A string of the distribution name. One of Poisson, ZIP, NB, ZINB and Gaussian. default=ZIP

iter_num

A single integer vector, indicates max number of iteration used in the PSO algorithm that estimates model parameters

seed

A numeric variable of the random seed, affecting parametric fitting of the marginal distribution. default=123

mc.cores

Number of cores used for computing.

Value

A tibble of summary results of genes

Author

Shiyu Ma

Examples

data("df")
res <- scGTM::runscGTM(t=df$Time, y=df[,3:5])
#> The need of transformation:  FALSE
#> We are estimating gene Gene3 with marginal ZIP .
#> The need of transformation:  FALSE
#> We are estimating gene Gene1 with marginal ZIP .
#> The need of transformation:  FALSE
#> We are estimating gene Gene2 with marginal ZIP .

data("sce")
t_sce<-rownames(sce)
#> Loading required package: SingleCellExperiment
#> Loading required package: SummarizedExperiment
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#> 
#> Attaching package: ‘MatrixGenerics’
#> The following objects are masked from ‘package:matrixStats’:
#> 
#>     colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#>     colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#>     colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#>     colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#>     colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#>     colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#>     colWeightedMeans, colWeightedMedians, colWeightedSds,
#>     colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#>     rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#>     rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#>     rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#>     rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#>     rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#>     rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#>     rowWeightedSds, rowWeightedVars
#> Loading required package: GenomicRanges
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> 
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#>     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#>     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#>     tapply, union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> 
#> Attaching package: ‘S4Vectors’
#> The following objects are masked from ‘package:base’:
#> 
#>     I, expand.grid, unname
#> Loading required package: IRanges
#> Loading required package: GenomeInfoDb
#> Loading required package: Biobase
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
#> 
#> Attaching package: ‘Biobase’
#> The following object is masked from ‘package:MatrixGenerics’:
#> 
#>     rowMedians
#> The following objects are masked from ‘package:matrixStats’:
#> 
#>     anyMissing, rowMedians
res_sce <- runscGTM(t=t_sce, y=sce, sce="logcounts", marginal="Gaussian")
#> The need of transformation:  FALSE
#> We are estimating gene Dynlt1a with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Ptma with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Aldoa with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Gm10116 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Ybx1 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Stmn2 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Snca with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Ncdn with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Eef2 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Ppp3ca with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Tmsb10 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Tuba1b with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Tubb2b with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Tubb5 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Tuba1a with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Stmn1 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Igfbpl1 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Rplp0 with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Junb with marginal Gaussian .
#> The need of transformation:  FALSE
#> We are estimating gene Xist with marginal Gaussian .