Run GLMPCA (generalized version of principal components analysis)
Source:R/RunGLMPCA.R
RunGLMPCA.Rd
Run GLMPCA (generalized version of principal components analysis)
Usage
RunGLMPCA(object, ...)
# S3 method for class 'Seurat'
RunGLMPCA(
object,
assay = NULL,
layer = "counts",
features = NULL,
L = 5,
fam = c("poi", "nb", "nb2", "binom", "mult", "bern"),
rev.gmlpca = FALSE,
ndims.print = 1:5,
nfeatures.print = 30,
reduction.name = "glmpca",
reduction.key = "GLMPC_",
verbose = TRUE,
seed.use = 11,
...
)
# S3 method for class 'Assay'
RunGLMPCA(
object,
assay = NULL,
layer = "counts",
features = NULL,
L = 5,
fam = c("poi", "nb", "nb2", "binom", "mult", "bern"),
rev.gmlpca = FALSE,
ndims.print = 1:5,
nfeatures.print = 30,
reduction.key = "GLMPC_",
verbose = TRUE,
seed.use = 11,
...
)
# S3 method for class 'Assay5'
RunGLMPCA(
object,
assay = NULL,
layer = "counts",
features = NULL,
L = 5,
fam = c("poi", "nb", "nb2", "binom", "mult", "bern"),
rev.gmlpca = FALSE,
ndims.print = 1:5,
nfeatures.print = 30,
reduction.key = "GLMPC_",
verbose = TRUE,
seed.use = 11,
...
)
# Default S3 method
RunGLMPCA(
object,
assay = NULL,
layer = "counts",
features = NULL,
L = 5,
fam = c("poi", "nb", "nb2", "binom", "mult", "bern"),
rev.gmlpca = FALSE,
ndims.print = 1:5,
nfeatures.print = 30,
reduction.key = "GLMPC_",
verbose = TRUE,
seed.use = 11,
...
)
Arguments
- object
An object. This can be a Seurat object, an assay object, or a matrix-like object.
- ...
Additional arguments to be passed to the glmpca::glmpca function.
- assay
A character string specifying the assay to be used for the analysis. Default is NULL.
- layer
A character string specifying the layer to be used for the analysis. Default is "counts".
- features
A character vector specifying the features to be used for the analysis. Default is NULL, which uses all variable features.
- L
An integer specifying the number of components to be computed. Default is 5.
- fam
A character string specifying the family of the generalized linear model to be used. Currently supported values are "poi", "nb", "nb2", "binom", "mult", and "bern". Default is "poi".
- rev.gmlpca
A logical value indicating whether to perform reverse GLMPCA (i.e., transpose the input matrix) before running the analysis. Default is FALSE.
- ndims.print
An integer vector specifying the dimensions (number of components) to print in the output. Default is 1:5.
- nfeatures.print
An integer specifying the number of features to print in the output. Default is 30.
- reduction.name
A character string specifying the name of the reduction to be stored in the Seurat object. Default is "glmpca".
- reduction.key
A character string specifying the prefix for the column names of the basis vectors. Default is "GLMPC_".
- verbose
A logical value indicating whether to print verbose output. Default is TRUE.
- seed.use
An integer specifying the random seed to be used. Default is 11.
Examples
pancreas_sub <- RunGLMPCA(object = pancreas_sub)
#> ℹ [2025-07-26 07:51:57] GLMPC_ 1
#> ℹ [2025-07-26 07:51:57] Positive: Sparcl1, Crabp1, Col1a1, Col5a1, Colec12, Xkr5, Islr, Pmp22, Col1a2, Platr22
#> ℹ [2025-07-26 07:51:57] Plscr2, Ugt2b5, Trabd2b, Slc26a3, Nat8l, Tmem119, Gm6878, Spaca7, Gm7854, Ctgf
#> ℹ [2025-07-26 07:51:57] Wnt5a, Ptgfr, Tpm2, Spp2, Hhip, Gm20649, Nkain4, Slc25a48, Hist1h2an, Wdr72
#> ℹ [2025-07-26 07:51:57] Negative: RP23-477O13.1, Npy1r, Areg, Slc6a19, RP23-428N8.3, Gast, Nkx6-3, Myl7, Unc13d, Rbm11
#> ℹ [2025-07-26 07:51:57] Wif1, Xkr6, Bcas1os1, Tnfaip8l3, Col14a1, March11, Pyy, Oxtr, Slc25a43, Otc
#> ℹ [2025-07-26 07:51:57] Pnoc, Ccl28, Sez6l, Smim18, Pcdh8, Ptprt, Asb4, Msx1, Ppp2r2c, Skap1
#> ℹ [2025-07-26 07:51:57] GLMPC_ 2
#> ℹ [2025-07-26 07:51:57] Positive: Calca, Gast, Pnoc, Col19a1, Gm12689, Mstn, P2ry12, Gm13075, Rpp25, Ins1
#> ℹ [2025-07-26 07:51:57] Rasl11a, A630076J17Rik, Meikin, Nrcam, Gpr179, Car3, Mb, Cbln4, Gcg, Pgr
#> ℹ [2025-07-26 07:51:57] Nat8l, Plscr2, Foxd3, Ngf, Ptgfr, Ctgf, Gm43948, Slc25a48, Pmp22, Xkr5
#> ℹ [2025-07-26 07:51:57] Negative: Unc13d, Adra2c, 4932438H23Rik, Bhlhe22, Pdcd1, Slc4a1, Snai1, Cmklr1, Ppp1r16b, Pou3f1
#> ℹ [2025-07-26 07:51:57] Fam71b, Notum, Wnt3, Tgm7, Necab3, 1700128E19Rik, Eya2, Fgf18, Aldob, Siglece
#> ℹ [2025-07-26 07:51:57] Tmem114, Myl2, Sftpc, 1520401A03Rik, Jakmip3, Epb42, Sema3g, Neurod2, Krt15, Megf11
#> ℹ [2025-07-26 07:51:57] GLMPC_ 3
#> ℹ [2025-07-26 07:51:57] Positive: Wnt6, Gcg, Calcr, Agmo, Cxcl15, Sprr1a, Gm13075, 1700028P14Rik, Il17b, Oasl2
#> ℹ [2025-07-26 07:51:57] Car3, Pou6f2, Col19a1, Dpep2, Necab3, Crabp1, Hoxb2, RP23-477O13.1, Cd36, Lrrn3
#> ℹ [2025-07-26 07:51:57] Gpr179, Nrl, Rgs4, Spp2, Ppp1r3b, Vipr1, Fmod, Irx1, Calb1, Fut1
#> ℹ [2025-07-26 07:51:57] Negative: Thsd7a, Gm12689, Npy, Hvcn1, Htr1d, Ins2, Syndig1l, Mxd3, Pif1, Esco2
#> ℹ [2025-07-26 07:51:57] Gip, Tmem215, Rpp25, Kif11, Esyt3, Chrna3, Msx1, Ugt2b5, Casc5, Cd177
#> ℹ [2025-07-26 07:51:57] Hist1h1b, Areg, Derl3, Aurkb, Nnat, Neil3, Ncapg, Kif14, Cdkn2c, Ndc80
#> ℹ [2025-07-26 07:51:57] GLMPC_ 4
#> ℹ [2025-07-26 07:51:57] Positive: Dpep2, Cxcl15, Lrrk1, Rasl11a, Gm13375, Cxcl10, Vsig8, Cxcl16, Ptpn5, Ccl20
#> ℹ [2025-07-26 07:51:57] Adm2, Slc1a4, Akr1c18, Dab2, Pgr, Fhl1, Gm13075, Thbs1, Cypt3, Clca3a2
#> ℹ [2025-07-26 07:51:57] Krt23, Tnf, Hs6st2, Creb5, Trpc4, Arhgap22, Nrarp, AU021092, Nrcam, Samd4
#> ℹ [2025-07-26 07:51:57] Negative: Sparcl1, Sst, Col19a1, Vipr1, 1700028P14Rik, Islr, Col1a2, Col1a1, Crabp1, Tmem119
#> ℹ [2025-07-26 07:51:57] Oxtr, Gm7854, Hhip, Il17b, Ppp1r27, Col6a1, Nkain4, Col5a1, Pgc, Cntn1
#> ℹ [2025-07-26 07:51:57] Hist1h2an, Abcc9, Slc4a1, Colec12, Gm6878, Ugt2b5, Gsg1l, Gm11789, Gcg, Ajap1
#> ℹ [2025-07-26 07:51:57] GLMPC_ 5
#> ℹ [2025-07-26 07:51:57] Positive: Ghrl, Foxd3, Cbln4, Ngf, Tmem119, Irs4, Abcc9, R3hdml, Wnt6, Lrrtm3
#> ℹ [2025-07-26 07:51:57] Cym, Zcchc12, Arhgap22, Mboat4, Guca2a, Nkx6-3, Car3, Ugt2b5, Fam111a, Tox2
#> ℹ [2025-07-26 07:51:57] Elfn1, Thsd7a, Pgc, Clspn, Gm12689, St8sia2, 1700028P14Rik, Slfn9, Mcm10, Fam124a
#> ℹ [2025-07-26 07:51:57] Negative: 3830403N18Rik, Pappa, Sprr1a, Hhip, Fndc1, Nrl, Gm26652, Aldob, Dpep2, Tmem252
#> ℹ [2025-07-26 07:51:57] Abhd11os, 2410021H03Rik, Iapp, Bcas3os2, Col19a1, Unc13d, Gp9, Oprk1, Gm11789, Zfp433
#> ℹ [2025-07-26 07:51:57] Lyve1, Slc30a8, C2cd4a, Lce6a, Ppp1r27, P2ry12, Crhr2, Elfn2, D7Ertd443e, Gm2694
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "glmpca"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.