This function performs a standard single-cell analysis workflow.
Usage
standard_scop(
srt,
prefix = "Standard",
assay = NULL,
do_normalization = NULL,
normalization_method = "LogNormalize",
do_HVF_finding = TRUE,
HVF_method = "vst",
nHVF = 2000,
HVF = NULL,
do_scaling = TRUE,
vars_to_regress = NULL,
regression_model = "linear",
linear_reduction = "pca",
linear_reduction_dims = 50,
linear_reduction_dims_use = NULL,
linear_reduction_params = list(),
force_linear_reduction = FALSE,
nonlinear_reduction = "umap",
nonlinear_reduction_dims = c(2, 3),
nonlinear_reduction_params = list(),
force_nonlinear_reduction = TRUE,
neighbor_metric = "euclidean",
neighbor_k = 20L,
cluster_algorithm = "louvain",
cluster_resolution = 0.6,
seed = 11
)
Arguments
- srt
A Seurat object.
- prefix
A prefix to add to the names of intermediate objects created by the function (default is "Standard").
- assay
The name of the assay to use for the analysis. If NULL, the default assay of the Seurat object will be used.
- do_normalization
A logical value indicating whether to perform normalization. If NULL, normalization will be performed if the specified assay does not have scaled data.
- normalization_method
The method to use for normalization. Options are "LogNormalize", "SCT", or "TFIDF" (default is "LogNormalize").
- do_HVF_finding
A logical value indicating whether to perform high variable feature finding. If TRUE, the function will force to find the highly variable features (HVF) using the specified HVF method.
- HVF_method
The method to use for finding highly variable features. Options are "vst", "mvp" or "disp" (default is "vst").
- nHVF
The number of highly variable features to select. If NULL, all highly variable features will be used.
- HVF
A vector of feature names to use as highly variable features. If NULL, the function will use the highly variable features identified by the HVF method.
- do_scaling
A logical value indicating whether to perform scaling. If TRUE, the function will force to scale the data using the ScaleData function.
- vars_to_regress
A vector of feature names to use as regressors in the scaling step. If NULL, no regressors will be used.
- regression_model
The regression model to use for scaling. Options are "linear", "poisson", or "negativebinomial" (default is "linear").
- linear_reduction
The linear dimensionality reduction method to use. Options are "pca", "svd", "ica", "nmf", "mds", or "glmpca" (default is "pca").
- linear_reduction_dims
The number of dimensions to keep after linear dimensionality reduction (default is 50).
- linear_reduction_dims_use
The dimensions to use for downstream analysis. If NULL, all dimensions will be used.
- linear_reduction_params
A list of parameters to pass to the linear dimensionality reduction method.
- force_linear_reduction
A logical value indicating whether to force linear dimensionality reduction even if the specified reduction is already present in the Seurat object.
- nonlinear_reduction
The nonlinear dimensionality reduction method to use. Options are "umap","umap-naive", "tsne", "dm", "phate", "pacmap", "trimap", "largevis", or "fr" (default is "umap").
- nonlinear_reduction_dims
The number of dimensions to keep after nonlinear dimensionality reduction. If a vector is provided, different numbers of dimensions can be specified for each method (default is c(2, 3)).
- nonlinear_reduction_params
A list of parameters to pass to the nonlinear dimensionality reduction method.
- force_nonlinear_reduction
A logical value indicating whether to force nonlinear dimensionality reduction even if the specified reduction is already present in the Seurat object.
- neighbor_metric
The distance metric to use for finding neighbors. Options are "euclidean", "cosine", "manhattan", or "hamming" (default is "euclidean").
- neighbor_k
The number of nearest neighbors to use for finding neighbors (default is 20).
- cluster_algorithm
The clustering algorithm to use. Options are "louvain", "slm", or "leiden" (default is "louvain").
- cluster_resolution
The resolution parameter to use for clustering. Larger values result in fewer clusters (default is 0.6).
- seed
The random seed to use for reproducibility (default is 11).
Examples
library(Matrix)
PrepareEnv()
#> ℹ [2025-07-26 08:07:29] Preparing scop Python Environment
#> ℹ [2025-07-26 08:07:29] Environment name: scop_env
#> ℹ [2025-07-26 08:07:29] Python version: 3.10-1
#> ℹ [2025-07-26 08:07:29] Number of packages to install: 20
#> ℹ [2025-07-26 08:07:29] Auto-detecting conda...
#> ℹ [2025-07-26 08:07:38] Creating conda environment with Python 3.10-1...
#> + /usr/share/miniconda/bin/conda create --yes --name scop_env 'python=3.10-1' pip setuptools wheel --quiet -c conda-forge
#> ✔ [2025-07-26 08:08:00] Environment created successfully: /usr/share/miniconda/envs/scop_env
#> ℹ [2025-07-26 08:08:00] Checking and installing required packages...
#> ℹ [2025-07-26 08:08:00] Installing conda packages
#> ℹ [2025-07-26 08:08:01] Try to install leidenalg,python-igraph,tbb
#> ℹ [2025-07-26 08:08:01] Installing 3 packages into environment: scop_env
#> ℹ [2025-07-26 08:08:02] Installing packages via conda...
#> ℹ [2025-07-26 08:08:02] Using channel: conda-forge
#> ℹ [2025-07-26 08:08:02] Installing 3 packages...
#> + /usr/share/miniconda/bin/conda 'install' '--yes' '--name' 'scop_env' '-c' 'conda-forge' 'leidenalg' 'python-igraph' 'tbb'
#> ✔ [2025-07-26 08:08:09] conda installation completed successfully
#> ℹ [2025-07-26 08:08:09] Checking 3 packages in environment: scop_env
#> ℹ [2025-07-26 08:08:10] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:08:11] Found 49 packages installed
#> ✔ [2025-07-26 08:08:11] 'leidenalg' version: 0.10.2
#> ✔ [2025-07-26 08:08:11] 'python-igraph' version: 0.11.9
#> ✔ [2025-07-26 08:08:11] 'tbb' version: 2022.2.0
#> ℹ [2025-07-26 08:08:11] Installing pip packages
#> ℹ [2025-07-26 08:08:11] Try to install matplotlib>=3.5,<3.11,numba>=0.59,<0.60.0,llvmlite>=0.42,<0.43.0,numpy>=1.24,<1.27.0,palantir,pandas>=2.0,<2.1,scanpy>=1.9,<1.12,scikit-learn,scipy>=1.10,scvelo,wot,trimap,pacmap,phate,bbknn,scanorama,scvi-tools
#> ℹ [2025-07-26 08:08:11] Installing 18 packages into environment: scop_env
#> ℹ [2025-07-26 08:08:12] Installing packages via pip...
#> ✔ [2025-07-26 08:10:13] pip installation completed
#> ℹ [2025-07-26 08:10:14] Checking 17 packages in environment: scop_env
#> ℹ [2025-07-26 08:10:14] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:10:16] Found 189 packages installed
#> ✔ [2025-07-26 08:10:16] 'matplotlib' version: 3.10.3
#> ✔ [2025-07-26 08:10:16] 'numba' version: 0.59.1
#> ✔ [2025-07-26 08:10:16] 'llvmlite' version: 0.42.0
#> ✔ [2025-07-26 08:10:16] 'numpy' version: 1.26.4
#> ✔ [2025-07-26 08:10:16] 'palantir' version: 1.4.1
#> ✔ [2025-07-26 08:10:16] 'pandas' version: 2.0.3
#> ✔ [2025-07-26 08:10:16] 'scanpy' version: 1.11.3
#> ✔ [2025-07-26 08:10:16] 'scikit-learn' version: 1.7.1
#> ✔ [2025-07-26 08:10:16] 'scipy' version: 1.15.3
#> ✔ [2025-07-26 08:10:16] 'scvelo' version: 0.3.3
#> ✔ [2025-07-26 08:10:16] 'wot' version: 1.0.8.post2
#> ✔ [2025-07-26 08:10:16] 'trimap' version: 1.1.4
#> ✔ [2025-07-26 08:10:16] 'pacmap' version: 0.8.0
#> ✔ [2025-07-26 08:10:16] 'phate' version: 1.0.11
#> ✔ [2025-07-26 08:10:16] 'bbknn' version: 1.6.0
#> ✔ [2025-07-26 08:10:16] 'scanorama' version: 1.7.4
#> ✔ [2025-07-26 08:10:16] 'scvi-tools' version: 1.2.1
#> conda environment:
#> conda: /usr/share/miniconda/bin/conda
#> environment: /usr/share/miniconda/envs/scop_env
#> python config:
#> python: /usr/share/miniconda/envs/scop_env/bin/python3.10
#> libpython: /usr/share/miniconda/envs/scop_env/lib/libpython3.10.so
#> pythonhome: /usr/share/miniconda/envs/scop_env:/usr/share/miniconda/envs/scop_env
#> version: 3.10.1 | packaged by conda-forge | (main, Dec 22 2021, 01:39:36) [GCC 9.4.0]
#> numpy: /usr/share/miniconda/envs/scop_env/lib/python3.10/site-packages/numpy
#> numpy_version: 1.26.4
#>
#> NOTE: Python version was forced by use_python() function
#> ✔ [2025-07-26 08:10:21] Python Environment Ready
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-07-26 08:10:22] Start standard_scop
#> ℹ [2025-07-26 08:10:22] Checking srt_list...
#> ℹ [2025-07-26 08:10:23] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-26 08:10:23] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-26 08:10:23] Use the separate HVF from srt_list...
#> ℹ [2025-07-26 08:10:23] Number of available HVF: 2000
#> ℹ [2025-07-26 08:10:23] Finished checking.
#> ℹ [2025-07-26 08:10:23] Perform ScaleData on the data...
#> ℹ [2025-07-26 08:10:24] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-26 08:10:24] Linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-26 08:10:24] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:10:24] Reorder clusters...
#> ! [2025-07-26 08:10:24] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:10:24] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:10:24] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:10:28] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ✔ [2025-07-26 08:10:32] Run standard_scop done
#> ℹ [2025-07-26 08:10:32] Elapsed time: 10.26 secs
CellDimPlot(
pancreas_sub,
group.by = "SubCellType"
)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
# Use a combination of different linear
# or non-linear dimension reduction methods
linear_reductions <- c(
"pca", "nmf", "mds", "glmpca"
)
pancreas_sub <- standard_scop(
pancreas_sub,
linear_reduction = linear_reductions,
nonlinear_reduction = "umap"
)
#> ℹ [2025-07-26 08:10:33] Start standard_scop
#> ℹ [2025-07-26 08:10:33] Checking srt_list...
#> ℹ [2025-07-26 08:10:33] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-26 08:10:33] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-26 08:10:33] Use the separate HVF from srt_list...
#> ℹ [2025-07-26 08:10:34] Number of available HVF: 2000
#> ℹ [2025-07-26 08:10:34] Finished checking.
#> ℹ [2025-07-26 08:10:34] Perform ScaleData on the data...
#> ℹ [2025-07-26 08:10:34] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-26 08:10:34] Linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-26 08:10:34] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:10:35] Reorder clusters...
#> ! [2025-07-26 08:10:35] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:10:35] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:10:35] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP2D_’ taken, using ‘standardpcaumap2d_’ instead
#> ℹ [2025-07-26 08:10:39] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP3D_’ taken, using ‘standardpcaumap3d_’ instead
#> ℹ [2025-07-26 08:10:43] Perform linear dimension reduction (nmf) on the data...
#>
#> iter | tol
#> ---------------
#> 1 | 6.93e-01
#> 2 | 1.03e-01
#> 3 | 3.21e-02
#> 4 | 1.47e-02
#> 5 | 8.33e-03
#> 6 | 5.22e-03
#> 7 | 3.55e-03
#> 8 | 2.59e-03
#> 9 | 1.97e-03
#> 10 | 1.52e-03
#> 11 | 1.21e-03
#> 12 | 9.88e-04
#> 13 | 8.17e-04
#> 14 | 6.82e-04
#> 15 | 5.71e-04
#> 16 | 4.81e-04
#> 17 | 4.10e-04
#> 18 | 3.49e-04
#> 19 | 3.08e-04
#> 20 | 2.80e-04
#> 21 | 2.53e-04
#> 22 | 2.30e-04
#> 23 | 2.12e-04
#> 24 | 1.95e-04
#> 25 | 1.83e-04
#> 26 | 1.72e-04
#> 27 | 1.64e-04
#> 28 | 1.58e-04
#> 29 | 1.54e-04
#> 30 | 1.51e-04
#> 31 | 1.49e-04
#> 32 | 1.49e-04
#> 33 | 1.51e-04
#> 34 | 1.54e-04
#> 35 | 1.58e-04
#> 36 | 1.61e-04
#> 37 | 1.65e-04
#> 38 | 1.67e-04
#> 39 | 1.68e-04
#> 40 | 1.67e-04
#> 41 | 1.66e-04
#> 42 | 1.63e-04
#> 43 | 1.59e-04
#> 44 | 1.55e-04
#> 45 | 1.50e-04
#> 46 | 1.44e-04
#> 47 | 1.36e-04
#> 48 | 1.24e-04
#> 49 | 1.12e-04
#> 50 | 1.01e-04
#> 51 | 8.96e-05
#> 52 | 7.88e-05
#> 53 | 7.01e-05
#> 54 | 6.33e-05
#> 55 | 5.80e-05
#> 56 | 5.33e-05
#> 57 | 4.98e-05
#> 58 | 4.66e-05
#> 59 | 4.35e-05
#> 60 | 4.13e-05
#> 61 | 3.91e-05
#> 62 | 3.70e-05
#> 63 | 3.45e-05
#> 64 | 3.22e-05
#> 65 | 2.97e-05
#> 66 | 2.72e-05
#> 67 | 2.53e-05
#> 68 | 2.37e-05
#> 69 | 2.25e-05
#> 70 | 2.13e-05
#> 71 | 2.04e-05
#> 72 | 1.96e-05
#> 73 | 1.89e-05
#> 74 | 1.84e-05
#> 75 | 1.79e-05
#> 76 | 1.76e-05
#> 77 | 1.75e-05
#> 78 | 1.73e-05
#> 79 | 1.72e-05
#> 80 | 1.73e-05
#> 81 | 1.75e-05
#> 82 | 1.78e-05
#> 83 | 1.81e-05
#> 84 | 1.85e-05
#> 85 | 1.91e-05
#> 86 | 1.98e-05
#> 87 | 2.05e-05
#> 88 | 2.13e-05
#> 89 | 2.20e-05
#> 90 | 2.27e-05
#> 91 | 2.33e-05
#> 92 | 2.39e-05
#> 93 | 2.35e-05
#> 94 | 2.36e-05
#> 95 | 2.22e-05
#> 96 | 2.16e-05
#> 97 | 2.11e-05
#> 98 | 2.10e-05
#> 99 | 2.09e-05
#> 100 | 2.09e-05
#>
#> convergence not reached in 100 iterations
#> (actual tol = 2.09e-05, target tol = 1.00e-05)
#> ℹ StandardBE_ 1
#> Positive: Spp1, Sparc, Atp1b1, Vim, Dbi, Clu, Mgst1, Anxa2, Acot1, Cldn3
#> Krt18, Mt1, 1700011H14Rik, Id2, S100a10, Gsta3, S100a11, Krt8, Bicc1, Jun
#> Pdzk1ip1, Mt2, Cyr61, Nudt19, Smtnl2, Ifitm2, Rps12, Sox9, Lurap1l, Rpl12
#> Negative: Doc2b, Fut1, Gm10244, Gm44210, Pdgfc, Ak5, Snhg11, 9930012K11Rik, Efnb2, Carhsp1
#> Hmgcr, Scnn1b, Gmds, Msh6, Ap3b2, Tmem184c, Cgref1, Diaph3, Antxr2, Insig1
#> Mat1a, Tmem198, Rfx6, Pif1, Xkr5, Elfn1, Msantd1, Ajap1, Gpld1, Ngb
#> StandardBE_ 2
#> Positive: Spp1, Ccnd1, Wfdc2, Mdk, Mgst1, Pebp1, Ptn, Cldn10, Vim, Gapdh
#> Krt8, Cldn3, Sox9, Krt18, Dbi, Aldh1b1, Ldha, Eno1, Rps12, Npm1
#> Rpl12, Ptma, Phgdh, Lurap1l, Deb1, Cd24a, Id2, Atp1b1, Tst, Ybx1
#> Negative: Fut1, Fxyd1, Foxm1, Gm10244, Gm44210, Pdgfc, Snhg11, 9930012K11Rik, Carhsp1, Hmgcr
#> Ap3b2, Tmem184c, Cgref1, Antxr2, Nbl1, Syt17, Mat1a, Tmem198, Rfx6, Xkr5
#> Elfn1, Tmem132b, Msantd1, Ajap1, Hist2h4, Gpld1, Akr1c18, Ngb, Efr3b, Zfp879
#> StandardBE_ 3
#> Positive: Clu, Spp1, Mt1, Csrp2, Krt18, Muc1, H19, Cldn3, Mt2, Hhex
#> Gapdh, Mdk, Rps12, Akr1c19, Mgst1, Rpl36a, Cyr61, Atp1b1, Zfos1, S100a11
#> Pdzk1ip1, Sparc, 1700011H14Rik, Ambp, Gas6, Ldha, 8430408G22Rik, Ttr, Jun, Pdgfa
#> Negative: Doc2b, Fut1, Fxyd1, Foxm1, Prdm5, Gm10244, Gm44210, Ak5, Efnb2, Carhsp1
#> Rrbp1, Hmgcr, Scnn1b, Ap3b2, Tmem184c, Fgfr1, Diaph3, Dzip1l, Insig1, Mapkapk3
#> Tmem198, Rfx6, Pif1, Tmem132b, Ajap1, Hist2h4, Ngb, Efr3b, BC034090, Atp2c1
#> StandardBE_ 4
#> Positive: Cck, Gadd45a, Mdk, Sox4, Ppp1r14a, Selm, Tmsb4x, Tubb3, Jun, Igfbpl1
#> Btbd17, Neurod2, Sult2b1, Cldn6, Cdkn1a, Smarcd2, Cotl1, Mfap4, Btg2, Hes6
#> Ptma, Aplp1, Sh3bgrl3, Hn1, Mfng, Ppp3ca, Camk2n1, Npm1, Rpl12, Gnas
#> Negative: Doc2b, Fut1, Fxyd1, Foxm1, Prdm5, Gm10244, Pdgfc, Ak5, Efnb2, Ugt2b35
#> Rrbp1, Scnn1b, Sult5a1, Gmds, Notch1, Fgfr1, Clcf1, Cgref1, Diaph3, Neu2
#> Hprt, Antxr2, Nbl1, Dzip1l, Mapkapk3, Tmem198, Xkr5, Tmem132b, Hist2h4, Gpld1
#> StandardBE_ 5
#> Positive: 2810417H13Rik, Dut, Rrm2, Pcna, Lig1, Hmgb2, Tyms, H2afz, Gmnn, Tuba1b
#> Tipin, Dek, Dnajc9, Tubb5, Mcm5, Tk1, Nasp, Siva1, Gins2, Mcm6
#> Rpa2, Spc24, Mcm3, Dhfr, Ranbp1, Uhrf1, Rfc2, Snrpd1, Cks1b, Dnmt1
#> Negative: Doc2b, Fut1, Prdm5, Gm44210, Ak5, Snhg11, 9930012K11Rik, Efnb2, Ugt2b35, Rrbp1
#> Scnn1b, Ap3b2, Pcdh9, Cgref1, Neu2, Mapkapk3, Tmem198, Rfx6, Pif1, Tmem132b
#> Ajap1, Gpld1, Akr1c18, Ngb, Efr3b, Zfp879, BC034090, Rnf150, Ccer2, Tpm2
#> ℹ [2025-07-26 08:10:48] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:10:48] Reorder clusters...
#> ! [2025-07-26 08:10:48] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:10:48] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:10:48] Non-linear dimensionality reduction(umap) using Reduction(Standardnmf, dims:1-50) as input
#> ℹ [2025-07-26 08:10:52] Non-linear dimensionality reduction(umap) using Reduction(Standardnmf, dims:1-50) as input
#> ℹ [2025-07-26 08:10:56] Perform linear dimension reduction (mds) on the data...
#> ℹ [2025-07-26 08:10:57] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:10:57] Reorder clusters...
#> ! [2025-07-26 08:10:57] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:10:57] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:10:57] Non-linear dimensionality reduction(umap) using Reduction(Standardmds, dims:1-50) as input
#> ℹ [2025-07-26 08:11:01] Non-linear dimensionality reduction(umap) using Reduction(Standardmds, dims:1-50) as input
#> ℹ [2025-07-26 08:11:05] Perform linear dimension reduction (glmpca) on the data...
#> ℹ [2025-07-26 08:12:09] StandardGLMPC_ 1
#> ℹ [2025-07-26 08:12:09] Positive: Tro, Gpr119, Ffar3, Gm16006, Ucn3, Lix1l, Igfbp1, Nap1l5, Ccl28, Nfasc
#> ℹ [2025-07-26 08:12:09] Ptprt, Gsg1l, Xkr6, Filip1, Meox1, Gm15496, Gm44210, Kcnc1, Spag8, Slitrk6
#> ℹ [2025-07-26 08:12:09] Ctnna3, Dll3, Glod5, Muc4, Snph, Rab27a, Slc8a2, Pabpn1l, Gm43948, Kcnb2
#> ℹ [2025-07-26 08:12:09] Negative: Gm20649, Veph1, Vamp5, Lama1, Cd14, Ttk, Mcm10, Gm26588, Lrrc8e, Cox4i2
#> ℹ [2025-07-26 08:12:09] Atp1a2, Mme, Ctgf, Glipr1, Adam11, Anxa3, Xkr5, Nat8l, Vtcn1, Filip1l
#> ℹ [2025-07-26 08:12:09] Spaca7, Exo1, Akr1cl, Akr1b7, AU021092, Cdkn2c, Smoc2, Ckap2l, Gpm6b, Scara3
#> ℹ [2025-07-26 08:12:09] StandardGLMPC_ 2
#> ℹ [2025-07-26 08:12:09] Positive: Gm26588, Rgs5, Edn1, Nkain4, Colec12, Prdm5, Col1a1, Pik3c2b, Dpysl3, Gm35986
#> ℹ [2025-07-26 08:12:09] Pcdh15, Pdpn, A830005F24Rik, D430041D05Rik, Tmem145, Rab17, Gm20649, Wnt5a, Col5a1, Atp2c1
#> ℹ [2025-07-26 08:12:09] Cym, Adam11, Ccdc106, Sapcd1, Gsg1l, Tpm2, Fam71a, Bmp2, Htr1d, 1700003F12Rik
#> ℹ [2025-07-26 08:12:09] Negative: Wfs1, Emb, Cyp51, Pdia4, Anp32e, Gm15441, Bex2, Slc25a5, Foxa2, Ap3b2
#> ℹ [2025-07-26 08:12:09] Fdps, Hsp90b1, Hepacam2, Pgrmc1, Ap1s2, Ccdc86, Creld2, C1qa, Zc3h3, Pdia3
#> ℹ [2025-07-26 08:12:09] Zdbf2, Vimp, Akr1c19, Rab3a, Hspa14, Gm10941, Hspa5, Dck, Fbxo32, Tmem184c
#> ℹ [2025-07-26 08:12:09] StandardGLMPC_ 3
#> ℹ [2025-07-26 08:12:09] Positive: Lor, Fam20a, Tmprss7, Pde1a, Asb4, A830005F24Rik, Cdkn2b, Gm5420, Stmn3, Rasl11a
#> ℹ [2025-07-26 08:12:09] Cypt3, Cldn2, Slc13a4, Adgb, Plet1, Prss50, Spock3, Cntn1, Scn9a, Tmem145
#> ℹ [2025-07-26 08:12:09] Tmem158, Gm10244, Fbp1, Sult1d1, Ptprz1, Ubash3b, Platr27, Phlda2, Icam1, Slc16a1
#> ℹ [2025-07-26 08:12:09] Negative: Siglece, 1700128E19Rik, Bhlhe22, Cmklr1, Egr4, Cryba4, Ngfr, Fgf18, Ppp1r16b, Tmem114
#> ℹ [2025-07-26 08:12:09] Sftpc, Ankrd2, Nhlh1, Ajap1, Klk10, Krt15, Slc52a3, Adam11, 1520401A03Rik, Neurod2
#> ℹ [2025-07-26 08:12:09] Slc43a1, 4932438H23Rik, Rnf165, Tgm7, Actrt3, Zeb1, Glod5, Cav2, Trpv6, Adra2c
#> ℹ [2025-07-26 08:12:09] StandardGLMPC_ 4
#> ℹ [2025-07-26 08:12:09] Positive: Lor, Pappa2, Rnf150, Myo5a, Ubash3b, Tph1, Tgfb1, Igfbp3, Gcnt3, Ntn1
#> ℹ [2025-07-26 08:12:09] Myl7, Vsig8, Xylt1, Sulf1, Wif1, Trpc4, Rpp25, Gm10382, Rnf165, Gm10244
#> ℹ [2025-07-26 08:12:09] Gprc5a, Gm44210, Gng3, Nrip3, Oip5, Cdkn2b, Ciart, Neurl3, 2410021H03Rik, Atp2c1
#> ℹ [2025-07-26 08:12:09] Negative: Mb, Rtp4, Sftpd, Gm8773, 2310057J18Rik, Otc, Snhg11, Fbp1, Gm6878, Snph
#> ℹ [2025-07-26 08:12:09] Stra6, Awat2, Gm6410, Adh1, Fam124a, Cntn1, Zfp879, Igsf1, Abhd11os, Fgfbp1
#> ℹ [2025-07-26 08:12:09] Tfpi, Ctnna3, Gm15496, Bcas1os1, Ptprz1, Krt15, Timp3, Colec12, Slc4a1, Ccdc69
#> ℹ [2025-07-26 08:12:09] StandardGLMPC_ 5
#> ℹ [2025-07-26 08:12:09] Positive: Bvht, Hey1, 4933427D14Rik, Vegfc, Mstn, Fam227a, Gm35986, Platr27, RP23-428N8.3, G630016G05Rik
#> ℹ [2025-07-26 08:12:09] Rtn1, Tgfb2, Cd36, Scnn1b, Slc2a3, Slc8a2, Ak5, Kcnj13, Trpc4, Gm15496
#> ℹ [2025-07-26 08:12:09] Wnt5a, Slc6a19, Egr4, 1700018L02Rik, Mb, Atp2c1, Ceacam10, Mmp16, Tenm3, Krt20
#> ℹ [2025-07-26 08:12:09] Negative: Abhd11os, Zeb1, Nfatc2ip, Ppp1r16b, Tpmt, Xkr6, Slc45a3, Gm10244, Adrb2, Plscr2
#> ℹ [2025-07-26 08:12:09] Adgra1, Msantd1, Lrrc8e, Cypt3, Neurl3, Lor, Adam11, Filip1, Zbtb7c, Stra6
#> ℹ [2025-07-26 08:12:09] C2cd4a, Gm2861, Snai1, Inmt, Gm26522, Gsg1l, Bcas1os1, Efcab11, Tpm2, Gcnt4
#> ℹ [2025-07-26 08:12:10] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:12:10] Reorder clusters...
#> ! [2025-07-26 08:12:10] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:12:10] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:12:10] Non-linear dimensionality reduction(umap) using Reduction(Standardglmpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:14] Non-linear dimensionality reduction(umap) using Reduction(Standardglmpca, dims:1-50) as input
#> ✔ [2025-07-26 08:12:18] Run standard_scop done
#> ℹ [2025-07-26 08:12:18] Elapsed time: 1.75 mins
plist1 <- lapply(
linear_reductions, function(lr) {
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = paste0(
"Standard", lr, "UMAP2D"
),
xlab = "", ylab = "", title = lr,
legend.position = "none",
theme_use = "theme_blank"
)
}
)
patchwork::wrap_plots(plotlist = plist1)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
nonlinear_reductions <- c(
"umap", "tsne", "dm", "phate",
"pacmap", "trimap", "largevis", "fr"
)
pancreas_sub <- standard_scop(
pancreas_sub,
linear_reduction = "pca",
nonlinear_reduction = nonlinear_reductions
)
#> ℹ [2025-07-26 08:12:18] Start standard_scop
#> ℹ [2025-07-26 08:12:18] Checking srt_list...
#> ℹ [2025-07-26 08:12:19] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-26 08:12:19] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-26 08:12:19] Use the separate HVF from srt_list...
#> ℹ [2025-07-26 08:12:19] Number of available HVF: 2000
#> ℹ [2025-07-26 08:12:20] Finished checking.
#> ℹ [2025-07-26 08:12:20] Perform ScaleData on the data...
#> ℹ [2025-07-26 08:12:20] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-26 08:12:20] Linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-26 08:12:20] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-26 08:12:21] Reorder clusters...
#> ! [2025-07-26 08:12:21] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-26 08:12:21] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-26 08:12:21] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:25] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:29] Perform nonlinear dimension reduction (tsne) on the data...
#> ℹ [2025-07-26 08:12:29] Non-linear dimensionality reduction(tsne) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:30] Non-linear dimensionality reduction(tsne) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:33] Perform nonlinear dimension reduction (dm) on the data...
#> ℹ [2025-07-26 08:12:33] Non-linear dimensionality reduction(dm) using Reduction(Standardpca, dims:1-50) as input
#> Warning: In destiny::DiffusionMap(data = Matrix::as.matrix(object), n_eigs = ndcs,
#> sigma = sigma, k = k, distance = dist.method, verbose = verbose,
#> ...) :
#> extra argument ‘graph’ will be disregarded
#> ℹ [2025-07-26 08:12:34] Non-linear dimensionality reduction(dm) using Reduction(Standardpca, dims:1-50) as input
#> Warning: In destiny::DiffusionMap(data = Matrix::as.matrix(object), n_eigs = ndcs,
#> sigma = sigma, k = k, distance = dist.method, verbose = verbose,
#> ...) :
#> extra argument ‘graph’ will be disregarded
#> ℹ [2025-07-26 08:12:34] Perform nonlinear dimension reduction (phate) on the data...
#> ℹ [2025-07-26 08:12:34] Non-linear dimensionality reduction(phate) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:36] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:12:36] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:12:38] Found 189 packages installed
#> ✔ [2025-07-26 08:12:38] 'phate' version: 1.0.11
#> ℹ [2025-07-26 08:12:43] Non-linear dimensionality reduction(phate) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:44] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:12:44] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:12:46] Found 189 packages installed
#> ✔ [2025-07-26 08:12:46] 'phate' version: 1.0.11
#> ℹ [2025-07-26 08:12:48] Perform nonlinear dimension reduction (pacmap) on the data...
#> ℹ [2025-07-26 08:12:48] Non-linear dimensionality reduction(pacmap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:12:49] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:12:49] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:12:51] Found 189 packages installed
#> ✔ [2025-07-26 08:12:51] 'pacmap' version: 0.8.0
#> ℹ [2025-07-26 08:13:15] Non-linear dimensionality reduction(pacmap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:13:16] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:13:17] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:13:19] Found 189 packages installed
#> ✔ [2025-07-26 08:13:19] 'pacmap' version: 0.8.0
#> ℹ [2025-07-26 08:13:19] Perform nonlinear dimension reduction (trimap) on the data...
#> ℹ [2025-07-26 08:13:20] Non-linear dimensionality reduction(trimap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:13:21] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:13:21] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:13:23] Found 189 packages installed
#> ✔ [2025-07-26 08:13:23] 'trimap' version: 1.1.4
#> ℹ [2025-07-26 08:13:39] Non-linear dimensionality reduction(trimap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:13:40] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-26 08:13:41] Retrieving package list for environment: scop_env
#> ℹ [2025-07-26 08:13:43] Found 189 packages installed
#> ✔ [2025-07-26 08:13:43] 'trimap' version: 1.1.4
#> ℹ [2025-07-26 08:13:43] Perform nonlinear dimension reduction (largevis) on the data...
#> ℹ [2025-07-26 08:13:43] Non-linear dimensionality reduction(largevis) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:16:15] Non-linear dimensionality reduction(largevis) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-26 08:18:55] Perform nonlinear dimension reduction (fr) on the data...
#> ℹ [2025-07-26 08:18:55] Non-linear dimensionality reduction(fr) using Graphs(Standardpca_SNN) as input
#> ℹ [2025-07-26 08:18:57] Non-linear dimensionality reduction(fr) using Graphs(Standardpca_SNN) as input
#> ✔ [2025-07-26 08:18:58] Run standard_scop done
#> ℹ [2025-07-26 08:18:58] Elapsed time: 6.66 mins
plist2 <- lapply(
nonlinear_reductions, function(nr) {
CellDimPlot(
pancreas_sub,
group.by = "SubCellType",
reduction = paste0(
"Standardpca", toupper(nr), "2D"
),
xlab = "", ylab = "", title = nr,
legend.position = "none",
theme_use = "theme_blank"
)
}
)
patchwork::wrap_plots(plotlist = plist2)
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.