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
data("pancreas_sub")
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2025-07-02 03:12:34] Start standard_scop
#> ℹ [2025-07-02 03:12:34] Checking srt_list...
#> ℹ [2025-07-02 03:12:35] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-02 03:12:35] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-02 03:12:35] Use the separate HVF from srt_list...
#> ℹ [2025-07-02 03:12:36] Number of available HVF: 2000
#> ℹ [2025-07-02 03:12:36] Finished checking.
#> ℹ [2025-07-02 03:12:36] Perform ScaleData on the data...
#> ℹ [2025-07-02 03:12:36] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-02 03:12:36] linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-02 03:12:36] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-02 03:12:36] Reorder clusters...
#> ! [2025-07-02 03:12:36] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-02 03:12:37] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-02 03:12:37] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:12:41] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> ✔ [2025-07-02 03:12:46] Run standard_scop done
#> ℹ [2025-07-02 03:12:46] Elapsed time:11.7 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-02 03:12:46] Start standard_scop
#> ℹ [2025-07-02 03:12:46] Checking srt_list...
#> ℹ [2025-07-02 03:12:47] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-02 03:12:47] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-02 03:12:47] Use the separate HVF from srt_list...
#> ℹ [2025-07-02 03:12:47] Number of available HVF: 2000
#> ℹ [2025-07-02 03:12:47] Finished checking.
#> ℹ [2025-07-02 03:12:47] Perform ScaleData on the data...
#> ℹ [2025-07-02 03:12:48] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-02 03:12:48] linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-02 03:12:48] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-02 03:12:48] Reorder clusters...
#> ! [2025-07-02 03:12:48] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-02 03:12:48] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-02 03:12:48] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP2D_’ taken, using ‘standardpcaumap2d_’ instead
#> ℹ [2025-07-02 03:12:53] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP3D_’ taken, using ‘standardpcaumap3d_’ instead
#> ℹ [2025-07-02 03:12:58] Perform linear dimension reduction (nmf) on the data...
#>
#> iter | tol
#> ---------------
#> 1 | 6.95e-01
#> 2 | 1.01e-01
#> 3 | 3.00e-02
#> 4 | 1.43e-02
#> 5 | 7.77e-03
#> 6 | 4.70e-03
#> 7 | 3.03e-03
#> 8 | 2.09e-03
#> 9 | 1.58e-03
#> 10 | 1.26e-03
#> 11 | 1.04e-03
#> 12 | 8.96e-04
#> 13 | 7.96e-04
#> 14 | 7.26e-04
#> 15 | 6.62e-04
#> 16 | 5.82e-04
#> 17 | 4.81e-04
#> 18 | 4.11e-04
#> 19 | 3.53e-04
#> 20 | 3.08e-04
#> 21 | 2.70e-04
#> 22 | 2.40e-04
#> 23 | 2.14e-04
#> 24 | 1.93e-04
#> 25 | 1.76e-04
#> 26 | 1.63e-04
#> 27 | 1.53e-04
#> 28 | 1.44e-04
#> 29 | 1.37e-04
#> 30 | 1.33e-04
#> 31 | 1.28e-04
#> 32 | 1.24e-04
#> 33 | 1.19e-04
#> 34 | 1.13e-04
#> 35 | 1.07e-04
#> 36 | 1.03e-04
#> 37 | 9.75e-05
#> 38 | 9.16e-05
#> 39 | 8.53e-05
#> 40 | 7.96e-05
#> 41 | 7.51e-05
#> 42 | 7.14e-05
#> 43 | 6.78e-05
#> 44 | 6.48e-05
#> 45 | 6.27e-05
#> 46 | 6.07e-05
#> 47 | 5.99e-05
#> 48 | 6.05e-05
#> 49 | 6.32e-05
#> 50 | 6.71e-05
#> 51 | 7.22e-05
#> 52 | 7.71e-05
#> 53 | 7.80e-05
#> 54 | 7.30e-05
#> 55 | 6.21e-05
#> 56 | 5.22e-05
#> 57 | 4.55e-05
#> 58 | 4.09e-05
#> 59 | 3.77e-05
#> 60 | 3.53e-05
#> 61 | 3.34e-05
#> 62 | 3.16e-05
#> 63 | 2.99e-05
#> 64 | 2.85e-05
#> 65 | 2.70e-05
#> 66 | 2.52e-05
#> 67 | 2.34e-05
#> 68 | 2.20e-05
#> 69 | 2.06e-05
#> 70 | 1.91e-05
#> 71 | 1.79e-05
#> 72 | 1.68e-05
#> 73 | 1.58e-05
#> 74 | 1.48e-05
#> 75 | 1.39e-05
#> 76 | 1.32e-05
#> 77 | 1.21e-05
#> 78 | 1.14e-05
#> 79 | 1.09e-05
#> 80 | 1.05e-05
#> 81 | 1.01e-05
#> 82 | 9.80e-06
#> ℹ [2025-07-02 03:13:02] StandardBE_ 1
#> Positive: Spp1, Cyr61, Vim, Cldn3, Jun, Sparc, Atp1b1, Sox4, Anxa2, Bicc1
#> Sox9, Krt18, Ifitm2, Peg3, Lurap1l, Myl12a, Krt8, 1700011H14Rik, Rhob, H19
#> Mgst1, Hhex, Dbi, Gpx1, Hes1, Epcam, Krt19, Cd24a, Klf6, Clu
#> Negative: Cpxm1, Setdb2, Hist1h4j, Fgf11, Prps2, Sobp, Apobr, Dynll1, Serp1, Tmcc3
#> Clip3, Ankrd37, Tex30, Spcs3, Aqp7, Dnah9, Cox7a1, Impa2, Ace2, Vipr1
#> Chrnb4, Tnfaip8l3, Ppp1r3b, Gm15816, Xkr5, Vsig10l, Wdr62, Oxtr, Antxr1, Msantd1
#> StandardBE_ 2
#> Positive: Cck, Gadd45a, Ppp1r14a, Selm, Tmsb4x, Mdk, Btbd17, Nkx6-1, Tubb3, Sh3bgrl3
#> Igfbpl1, Jun, Sox4, Smarcd2, Cotl1, Upk3bl, Map1b, Cldn6, Mfap4, Ptma
#> Ttc28, Ifitm2, Hes6, Neurod2, Dbn1, Btg2, Syt13, Sult2b1, Mfng, Ly6e
#> Negative: Cpxm1, Setdb2, Gmfg, Fkbp9, Prps2, Sobp, Apobr, Dynll1, P4ha3, Mgat4a
#> Mrps25, Ankrd37, Eef2k, Nucb2, Tex30, Spcs3, Rsad1, Tnip1, Dnah9, Axin2
#> Adamtsl2, Ispd, Pbxip1, Impa2, Fkbp10, Tnfrsf21, Ace2, Chrnb4, Tnfaip8l3, Ppp1r3b
#> StandardBE_ 3
#> Positive: Spp1, Id2, Atp1b1, Vim, Sparc, Mgst1, Mdk, Nudt19, Anxa2, Ccnd1
#> Dbi, Cldn3, Jun, Sox9, Ptn, Col9a3, Tkt, Hes1, Wfdc2, Smtnl2
#> Gsta3, Adamts1, Ifitm2, Aldoc, Cd24a, Tead2, Gpx1, Lurap1l, Ttyh1, Pebp1
#> Negative: Setdb2, Gmfg, Fgf11, Kif21b, Sobp, Tmcc3, Clip3, Ankrd37, Eef2k, Nucb2
#> Tex30, Tnip1, Aqp7, Dnah9, Axin2, Adamtsl2, Ispd, Cox7a1, Impa2, Fkbp10
#> Tnfrsf21, Ace2, Vipr1, Chrnb4, Tnfaip8l3, Gm26759, Ppp1r3b, Gm15816, Vsig10l, Syce1
#> StandardBE_ 4
#> Positive: Mt1, Mt2, Clu, Ambp, Pdzk1ip1, Muc1, Krt18, Gapdh, Csrp2, Ldha
#> Serpinh1, H19, Rbbp7, H1f0, Hsd17b10, Cyba, Cldn10, Dbi, Eno1, Bex4
#> Epcam, Ybx1, Gsta3, Bex1, Mif, Krt19, Smco4, Tpi1, Acot1, Capg
#> Negative: Cpxm1, Setdb2, Gmfg, Kif21b, Sobp, Mgat4a, Serp1, Hn1l, Tmcc3, Mrps25
#> Clip3, Tex30, Spcs3, Rangap1, Rsad1, Aqp7, Dnah9, Axin2, Adamtsl2, Ispd
#> Fkbp10, Ace2, Vipr1, Chrnb4, Tnfaip8l3, Gm26759, Ppp1r3b, Xkr5, Vsig10l, Wdr62
#> StandardBE_ 5
#> Positive: 2810417H13Rik, Rrm2, Hmgb2, Mcm5, Lig1, Dut, Gmnn, Pcna, Dek, Rpa2
#> Tyms, H2afz, Ranbp1, Tipin, Tuba1b, Mcm3, Uhrf1, Nasp, Rfc2, Orc6
#> Tubb5, Dhfr, Tk1, Hsp90aa1, Gins2, Mcm6, Ptma, Siva1, Mcm7, Dnajc9
#> Negative: Setdb2, Hist1h4j, Fgf11, Kif21b, Sobp, Serp1, Tmcc3, Clip3, Ankrd37, Rsad1
#> Tnip1, Aqp7, Dnah9, Axin2, Ispd, Rtkn, Cox7a1, Fkbp10, Tnfrsf21, Ace2
#> Vipr1, Chrnb4, Tnfaip8l3, Gm26759, Ppp1r3b, Gm15816, Vsig10l, Syce1, Wdr62, Oxtr
#> ℹ [2025-07-02 03:13:02] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-02 03:13:02] Reorder clusters...
#> ! [2025-07-02 03:13:02] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-02 03:13:02] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-02 03:13:02] Non-linear dimensionality reduction(umap) using Reduction(Standardnmf, dims:1-50) as input
#> ℹ [2025-07-02 03:13:07] Non-linear dimensionality reduction(umap) using Reduction(Standardnmf, dims:1-50) as input
#> ℹ [2025-07-02 03:13:12] Perform linear dimension reduction (mds) on the data...
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 't': no method for coercing this S4 class to a vector
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-02 03:13:13] Start standard_scop
#> ℹ [2025-07-02 03:13:13] Checking srt_list...
#> ℹ [2025-07-02 03:13:14] Data 1/1 of the srt_list has been log-normalized.
#> ℹ [2025-07-02 03:13:14] Perform FindVariableFeatures on the data 1/1 of the srt_list...
#> ℹ [2025-07-02 03:13:14] Use the separate HVF from srt_list...
#> ℹ [2025-07-02 03:13:14] Number of available HVF: 2000
#> ℹ [2025-07-02 03:13:14] Finished checking.
#> ℹ [2025-07-02 03:13:14] Perform ScaleData on the data...
#> ℹ [2025-07-02 03:13:15] Perform linear dimension reduction (pca) on the data...
#> ℹ [2025-07-02 03:13:15] linear_reduction(pca) is already existed. Skip calculation.
#> ℹ [2025-07-02 03:13:15] Perform FindClusters (louvain) on the data...
#> ℹ [2025-07-02 03:13:15] Reorder clusters...
#> ! [2025-07-02 03:13:15] Using 'Seurat::AggregateExpression()' to calculate pseudo-bulk data for 'Assay5'.
#> ℹ [2025-07-02 03:13:15] Perform nonlinear dimension reduction (umap) on the data...
#> ℹ [2025-07-02 03:13:15] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP2D_’ taken, using ‘standardpcaumap2d_’ instead
#> ℹ [2025-07-02 03:13:21] Non-linear dimensionality reduction(umap) using Reduction(Standardpca, dims:1-50) as input
#> Warning: Key ‘StandardpcaUMAP3D_’ taken, using ‘standardpcaumap3d_’ instead
#> ℹ [2025-07-02 03:13:26] Perform nonlinear dimension reduction (tsne) on the data...
#> ℹ [2025-07-02 03:13:26] Non-linear dimensionality reduction(tsne) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:13:28] Non-linear dimensionality reduction(tsne) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:13:32] Perform nonlinear dimension reduction (dm) on the data...
#> ℹ [2025-07-02 03:13:32] 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-02 03:13: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-02 03:13:34] Perform nonlinear dimension reduction (phate) on the data...
#> ℹ [2025-07-02 03:13:34] Non-linear dimensionality reduction(phate) using Reduction(Standardpca, dims:1-50) as input
#> ! [2025-07-02 03:13:45] scop_env python environment does not exist. Create it with 'PrepareEnv' function...
#> ℹ [2025-07-02 03:13:45] === Preparing scop Python Environment ===
#> ℹ [2025-07-02 03:13:45] Environment name: scop_env
#> ℹ [2025-07-02 03:13:45] Python version: 3.10-1
#> ℹ [2025-07-02 03:13:45] Number of packages to install: 20
#> ℹ [2025-07-02 03:13:45] Auto-detecting conda...
#> ℹ [2025-07-02 03:13:46] 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-02 03:14:10] Environment created successfully: /usr/share/miniconda/envs/scop_env
#> ℹ [2025-07-02 03:14:10] Checking and installing required packages...
#> ℹ [2025-07-02 03:14:10] Try to install leidenalg,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,python-igraph,scanpy>=1.9,<1.12,scikit-learn,scipy>=1.10,scvelo,wot,trimap,pacmap,phate,bbknn,scanorama,scvi-tools,tbb
#> ℹ [2025-07-02 03:14:10] Installing 21 packages into environment: scop_env
#> ℹ [2025-07-02 03:14:12] Installing packages via pip...
#> ✔ [2025-07-02 03:16:24] Pip installation completed
#> ℹ [2025-07-02 03:16:25] Checking 20 packages in environment: scop_env
#> ℹ [2025-07-02 03:16:26] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:16:28] Found 174 packages installed
#> ✔ [2025-07-02 03:16:28] leidenalg 0.10.2
#> ✔ [2025-07-02 03:16:28] matplotlib 3.10.3
#> ✔ [2025-07-02 03:16:28] numba 0.59.1
#> ✔ [2025-07-02 03:16:28] llvmlite 0.42.0
#> ✔ [2025-07-02 03:16:28] numpy 1.26.4
#> ℹ [2025-07-02 03:16:28] Progress: 5/20 packages checked
#> ✔ [2025-07-02 03:16:28] palantir 1.4.1
#> ✔ [2025-07-02 03:16:28] pandas 2.0.3
#> ✔ [2025-07-02 03:16:28] python-igraph 0.11.9
#> ✔ [2025-07-02 03:16:28] scanpy 1.11.3
#> ✔ [2025-07-02 03:16:28] scikit-learn 1.7.0
#> ℹ [2025-07-02 03:16:28] Progress: 10/20 packages checked
#> ✔ [2025-07-02 03:16:28] scipy 1.15.3
#> ✔ [2025-07-02 03:16:28] scvelo 0.3.3
#> ✔ [2025-07-02 03:16:28] wot 1.0.8.post2
#> ✔ [2025-07-02 03:16:28] trimap 1.1.4
#> ✔ [2025-07-02 03:16:28] pacmap 0.8.0
#> ℹ [2025-07-02 03:16:28] Progress: 15/20 packages checked
#> ✔ [2025-07-02 03:16:28] phate 1.0.11
#> ✔ [2025-07-02 03:16:28] bbknn 1.6.0
#> ✔ [2025-07-02 03:16:28] scanorama 1.7.4
#> ✔ [2025-07-02 03:16:28] scvi-tools 1.2.1
#> ✔ [2025-07-02 03:16:28] tbb 2022.2.0
#> ℹ [2025-07-02 03:16:28] Progress: 20/20 packages checked
#> ℹ [2025-07-02 03:16:28] Package check complete: 20/20 packages available
#> ℹ [2025-07-02 03:16:28] Setting up Python environment...
#> ==================== scop conda environment ====================
#> conda: /usr/share/miniconda/bin/conda
#> environment: /usr/share/miniconda/envs/scop_env
#> python: /usr/share/miniconda/envs/scop_env/bin/python3.10
#> ==================== scop 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-02 03:16:35] Initializing Python modules...
#> ✔ [2025-07-02 03:16:38] matplotlib initialized
#> ✔ [2025-07-02 03:16:41] scanpy initialized
#> ✔ [2025-07-02 03:16:41] scvelo initialized
#> ℹ [2025-07-02 03:16:41] === scop Python Environment Ready ===
#> ℹ [2025-07-02 03:16:41] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:16:42] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:16:44] Found 174 packages installed
#> ✔ [2025-07-02 03:16:44] phate 1.0.11
#> ℹ [2025-07-02 03:16:44] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:16:46] Non-linear dimensionality reduction(phate) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:16:47] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:16:48] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:16:50] Found 174 packages installed
#> ✔ [2025-07-02 03:16:50] phate 1.0.11
#> ℹ [2025-07-02 03:16:50] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:16:52] Perform nonlinear dimension reduction (pacmap) on the data...
#> ℹ [2025-07-02 03:16:52] Non-linear dimensionality reduction(pacmap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:16:53] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:16:54] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:16:56] Found 174 packages installed
#> ✔ [2025-07-02 03:16:56] pacmap 0.8.0
#> ℹ [2025-07-02 03:16:56] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:17:21] Non-linear dimensionality reduction(pacmap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:17:23] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:17:23] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:17:25] Found 174 packages installed
#> ✔ [2025-07-02 03:17:25] pacmap 0.8.0
#> ℹ [2025-07-02 03:17:25] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:17:26] Perform nonlinear dimension reduction (trimap) on the data...
#> ℹ [2025-07-02 03:17:26] Non-linear dimensionality reduction(trimap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:17:28] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:17:28] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:17:30] Found 174 packages installed
#> ✔ [2025-07-02 03:17:30] trimap 1.1.4
#> ℹ [2025-07-02 03:17:30] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:17:47] Non-linear dimensionality reduction(trimap) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:17:49] Checking 1 packages in environment: scop_env
#> ℹ [2025-07-02 03:17:50] Retrieving package list for environment: scop_env
#> ℹ [2025-07-02 03:17:52] Found 174 packages installed
#> ✔ [2025-07-02 03:17:52] trimap 1.1.4
#> ℹ [2025-07-02 03:17:52] Package check complete: 1/1 packages available
#> ℹ [2025-07-02 03:17:53] Perform nonlinear dimension reduction (largevis) on the data...
#> ℹ [2025-07-02 03:17:53] Non-linear dimensionality reduction(largevis) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:20:18] Non-linear dimensionality reduction(largevis) using Reduction(Standardpca, dims:1-50) as input
#> ℹ [2025-07-02 03:22:50] Perform nonlinear dimension reduction (fr) on the data...
#> ℹ [2025-07-02 03:22:50] Non-linear dimensionality reduction(fr) using Graphs(Standardpca_SNN) as input
#> ℹ [2025-07-02 03:22:51] Non-linear dimensionality reduction(fr) using Graphs(Standardpca_SNN) as input
#> ✔ [2025-07-02 03:22:53] Run standard_scop done
#> ℹ [2025-07-02 03:22:53] Elapsed time:9.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.