Run generalized principal components analysis (GLMPCA)
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. Can be a Seurat object, an assay object, or a matrix-like object.
- ...
Passed to the glmpca::glmpca function.
- assay
Assay to use.
NULLuses the default assay.- layer
Assay layer to use.
- features
Features used instead of a reduction.
- L
The number of components to be computed.
- fam
The family of the generalized linear model to be used. Currently supported values are
"poi","nb","nb2","binom","mult", and"bern".- rev.gmlpca
Whether to perform reverse GLMPCA (i.e., transpose the input matrix) before running the analysis.
- ndims.print
The dimensions (number of components) to print in the output.
- nfeatures.print
The number of features to print in the output.
- reduction.name
Reduction to be stored in the Seurat object.
- reduction.key
The prefix for the column names of the basis vectors.
- verbose
Whether to print the message. Default is
TRUE.- seed.use
Random seed.
Examples
data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
#> ℹ [2026-08-30 05:00:56] Start standard processing workflow...
#> ℹ [2026-08-30 05:00:56] Checking a list of <Seurat>...
#> ! [2026-08-30 05:00:56] Data 1/1 of the `srt_list` is "unknown"
#> Warning: Data 1/1 of the `srt_list` is "unknown"
#> ℹ [2026-08-30 05:00:56] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#> ℹ [2026-08-30 05:00:56] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#> ℹ [2026-08-30 05:00:57] Use the separate HVF from `srt_list`
#> ℹ [2026-08-30 05:00:57] Number of available HVF: 2000
#> ℹ [2026-08-30 05:00:57] Finished check
#> ℹ [2026-08-30 05:00:57] Perform `ScaleData()`
#> ℹ [2026-08-30 05:00:57] Perform pca linear dimension reduction
#> ℹ [2026-08-30 05:00:57] Use stored estimated dimensions 1:23 for Standardpca
#> ℹ [2026-08-30 05:00:58] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#> ℹ [2026-08-30 05:00:58] Reorder clusters...
#> ℹ [2026-08-30 05:00:58] Skip `log1p()` because `layer = data` is not "counts"
#> ℹ [2026-08-30 05:00:58] Perform umap nonlinear dimension reduction
#> ✔ [2026-08-30 05:01:06] Standard processing workflow completed
pancreas_sub <- RunGLMPCA(pancreas_sub)
#> ℹ GLMPC_ 1
#> ℹ Positive: Barx2, Cartpt, Gm3448, Ptger3, Mesp1, Prl, Gip, Ceacam10, Spock1, Cdkn2b
#> ℹ Dusp26, RP23-385E22.2, Pax6os1, Cypt3, 1700015F17Rik, 3930402G23Rik, RP23-428N8.3, 4930426D05Rik, Fbln5, Ucn3
#> ℹ Aard, Lrrc6, 1700001C02Rik, Kng2, Pcdh8, Tac1, 2410021H03Rik, Slc38a5, Gtf2ird2, A130057D12Rik
#> ℹ Negative: Col23a1, Col1a1, Col6a1, Ctgf, Islr, Anxa1, Isg15, Zfp385b, Sp140, Ctsk
#> ℹ P2ry2, Hoxb4, Plscr2, Platr22, Kcnj8, Col3a1, Timp3, Edn1, Gm26633, Prickle2
#> ℹ Il18, Pgr, Grin3a, Tagln, Pkd2l1, Lsp1, Tmem119, 1110002O04Rik, Tmem100, AA986860
#> ℹ GLMPC_ 2
#> ℹ Positive: Bhlhe22, Klk11, Laptm5, Cd37, Bhlhe23, Tfap2c, Sema3g, Tmem114, Fgf8, Adra2c
#> ℹ Neurod2, Krtap17-1, Epb42, Fam71b, Gm8773, Tgm7, Eya2, P2ry14, Glod5, Fgf18
#> ℹ Nhlh1, Gm6086, Prom2, 1700128E19Rik, Cmklr1, Ppp1r14a, Wnt3, Ifitm1, Snai2, Lynx1
#> ℹ Negative: Sst, Aif1, Klhl14, Gm26633, Dkk2, Col1a2, Ctgf, Tnni3, Col25a1, Ctsk
#> ℹ Col23a1, Lgr5, Crygn, Fam198b, RP23-428N8.3, Sp5, Fgb, Tac1, Zfp385b, Platr22
#> ℹ Cbln4, Kcne2, Gad2, 4930426D05Rik, Col6a1, 4930539E08Rik, M1ap, Prrg1, Olfml2a, Isg15
#> ℹ GLMPC_ 3
#> ℹ Positive: Col1a2, Gad2, Col6a1, Col23a1, Sparcl1, Gcg, Sp140, Islr, Calb1, Col1a1
#> ℹ Kcnj8, Guca2a, Col3a1, Tmem100, Galnt16, P2ry2, Hist1h4a, Pid1, Ryr3, Smpx
#> ℹ BC043934, Tstd1, Pou6f2, Fgb, Gsg1l, Ctsk, Tnni3, Itgb7, Fam46d, Gm6878
#> ℹ Negative: Pif1, RP23-58K20.3, Igfbp3, Kcne2, Gm933, Aif1, Sst, Msx1, Fam198b, Iqgap3
#> ℹ Aspm, Elovl4, Espl1, Depdc1a, Cdc25c, Kif2c, Nusap1, Cnrip1, Cenpf, Parpbp
#> ℹ Ccnb1, Gtse1, Hmmr, Mmel1, Bub1, Plk1, Kif20a, Icosl, RP23-4H17.3, Kif18a
#> ℹ GLMPC_ 4
#> ℹ Positive: Npy, Sparcl1, Dlgap1, Galnt16, Ins1, Gm38112, Gm15640, Cldn18, Kcnj8, Col3a1
#> ℹ Gad2, Ins2, Sp5, Jakmip3, Nhs, P2ry1, Islr, Adam32, Tmem215, Arhgap36
#> ℹ Hist1h1a, Syndig1l, Nckap5los, 1700024G13Rik, Col5a1, Fam124a, Slfn9, Nnat, Gm11789, Clspn
#> ℹ Negative: Anxa1, Gast, D7Ertd443e, Tstd1, Platr22, Tnfaip8l3, Edn1, Bmp2, Ctsk, Ifit1bl1
#> ℹ Fcgr3, Cd37, Fam46d, Ltb, Gm29440, Sp140, Zfp97, Srgn, Lmod3, Lst1
#> ℹ Rerg, 1500035N22Rik, Fgf8, Fam198b, Pkd2l1, Gm15895, Ngf, Pou6f2, Ankrd1, Gm13375
#> ℹ GLMPC_ 5
#> ℹ Positive: Cbln4, Tex36, Gm933, Ghrl, Irs4, Gpr6, Lrrtm3, Foxd3, Gm17455, Kcnj8
#> ℹ Anxa1, Galnt16, Arhgap22, Sparcl1, Tnni3, Col3a1, Platr22, Col23a1, St8sia2, Avp
#> ℹ RP23-172P1.4, Col1a2, Spock1, Islr, Gm3448, Prickle2, Tmem119, Colec12, Col1a1, Ngf
#> ℹ Negative: Srgn, Lst1, Fcgr3, Ryr3, Lmx1a, Tyrobp, Lrrc6, P2ry14, Il1r2, Kng2
#> ℹ Coro1a, Slfn2, Pid1, 4933440M02Rik, Rac2, Gm6410, 4930426D05Rik, Klhl14, Slc4a10, Alox5ap
#> ℹ Olfml2a, Gm37350, M1ap, Lgr5, Tac1, Gm11636, Ifitm1, Ncf2, Sp5, Fgb
CellDimPlot(
pancreas_sub,
group.by = "CellType",
reduction = "glmpca"
)