Package: PhiSpace 0.99.0

Jiadong Mao

PhiSpace: Continuous cell state annotation for single-cell and spatial omics data

Continuous phenotyping of bulk, single-cell and spatial omics data using partial least squares regression. The methods are described in Mao et al. (2025) <doi:10.1186/s13059-025-03755-8> and Mao et al. (2026) <doi:10.1016/j.crmeth.2026.101483>.

Authors:Jiadong Mao [aut, cre]

PhiSpace_0.99.0.tar.gz
PhiSpace_0.99.0.zip(r-4.7-any)PhiSpace_0.99.0.zip(r-4.6-any)PhiSpace_0.99.0.zip(r-4.5-any)
PhiSpace_0.99.0.tgz(r-4.6-any)PhiSpace_0.99.0.tgz(r-4.5-any)
PhiSpace_0.99.0.tar.gz(r-4.7-any)PhiSpace_0.99.0.tar.gz(r-4.6-any)
PhiSpace_0.99.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
PhiSpace/json (API)

# Install 'PhiSpace' in R:
install.packages('PhiSpace', repos = c('https://biocstaging.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mao-lab-org/phispace/issues

Pkgdown/docs site:https://mao-lab-org.github.io

On CRAN:

Conda:

softwaresinglecellspatialsequencingtranscriptomicsgeneexpressioncellbiologyclassificationregressiondimensionreductionclustering

4.87 score 62 scripts 36 exports 159 dependencies

Last updated from:684adb8ae0. Checks:1 NOTE, 9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksNOTE215
linux-develOK394
source / vignettesOK396
linux-releaseOK444
macos-releaseOK294
macos-oldrelOK761
windows-develOK2382
windows-releaseOK2057
windows-oldrelOK2344
wasm-releaseOK525

Exports:cellTypeCorMatCLRnormclusterPhiSpacecodeYcodeY_veccomputeUMAPdoubleCentfindNichesgetLabelsgetPCKeepCommonGeneslogNormTransflogTransfmvrnormPhiScoresPhiSpacePhiSpaceR_1refpiScoreplotPhiSpaceHeatMappseudoBulkrankFeaturesRankTransfreNameColssaveCellTypeMapsScore2ProbscoreCellsscranTransfselectFeatspatialSamplerspatialSmoothersubsampletrainPhiSpacetranslateLabeltunePhiSpaceVizSpatialzeroFeatQC

Dependencies:abindaskpassassortheadbackportsbeachmatBHBiobaseBiocFileCacheBiocGenericsBiocNeighborsBiocParallelBiocSingularbitbit64blobblusterbootbroomcachemcarcarDatacirclizecliclueclustercodetoolscolorspaceComplexHeatmapcorrplotcowplotcpp11crayoncurlDBIdbplyrDelayedArrayDerivdigestdoBydoParalleldplyrdqrngedgeRfarverfastmapfilelockFNNforeachforecastformatRFormulafracdifffutile.loggerfutile.optionsgenericsGenomicRangesGetoptLongggplot2ggpubrggrepelggsciggsignifGlobalOptionsgluegridExtragtableherehttr2igraphIRangesirlbaisobanditeratorsjsonlitekerndwdlabelinglambda.rlatticelifecyclelimmalme4lmtestlocfitmagickmagrittrMASSMatrixMatrixGenericsMatrixModelsmatrixStatsmemoisemetapodmgcvminqamodelrnlmenloptrnnetnumDerivopensslpbkrtestpillarpkgconfigplyrpngpolynompurrrquantregR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRcppTOMLRdpackreformulasreticulaterjsonrlangrprojrootRSpectraRSQLiterstatixrsvdS4ArraysS4VectorsS7ScaledMatrixscalesscranscuttleSeqinfoshapeSingleCellExperimentsitmosnowSparseArraySparseMSpatialExperimentstatmodstringistringrSummarizedExperimentsurvivalsystibbletidyrtidyselecttimeDateumapurcautf8vctrsviridisLitewithrXVectorzoo

Introduction to PhiSpace
Introduction | Installation | Data | Reference: ImmGen stem and progenitor cells | Query: single-cell RNA-seq of stem and progenitor cells | Normalisation | Annotation | Results | Scores by FACS gate | Discrete labels | The phenotype space | Session information

Last update: 2026-10-12
Started: 2026-10-12

PhiSpace ST for spatial transcriptomics
Introduction | Installation | Data | Query: a Visium section of the mouse brain | Reference: single-cell RNA-seq of the mouse cortex and hippocampus | Annotation | Cell type maps | Niches | Session information

Last update: 2026-10-12
Started: 2026-10-12

Readme and manuals

Help Manual

Help pageTopics
Convert a matrix to sparse metrix.as.sparse.matrix
Plot formatting for presentation and publicationbasicPlotFormat
Create cell type correlation matricescellTypeCorMat cellTypeCorMat,data.frame-method cellTypeCorMat,matrix-method cellTypeCorMat,SingleCellExperiment-method
Calculate classification errors.classErr
Center log ratio normalisationCLRnorm
K-means clustering on PhiSpace principal componentsclusterPhiSpace
Convert discrete annotations to dummy variable matrices.codeY
Convert discrete annotations to dummy variable matrices.codeY_vec
Compute kernel weights based on distancescompute_kernel_weights
Compute UMAP.computeUMAP
Tune ncomp using cross-validation.CVTune_ncomp
Tune nfeat using cross-validation.CVTune_nfeat
Double center a matrix by column and row means, resulting in a new matrix with zero row and column means.doubleCent
Find spatial niches by clustering PhiSpace scoresfindNiches
Compute different errors for cross-validation.getErr
Calculate errors for the cross-validation for selecting nfeat.getErr_nfeat
Turn scores into labelsgetLabels
Principal component analysis (PCA) based on partial singular value decomposition (SVD).getPC
Keep common genes of two SingleCellExperiment objects.KeepCommonGenes
Log-normalise counts with size factorslogNormTransf
Relative counts normalisation.logTransf
Multivariate regression via principal component analysis (PCA) or partial least squares (PLS).mvr
Normalise PhiSpace phenotypic scores by row or by column.normPhiScores
Soft phenotyping of query assay.phenotype
PhiSpace continuous phenotypingPhiSpace
PhiSpace annotation using a single referencePhiSpaceR_1ref
Compute pi-score for ranking differentially expressed genespiScore
Plot method for PhiSpaceClustering objectsplot.PhiSpaceClustering
Plot PhiSpace scores as a heatmapplotPhiSpaceHeatMap
Score a query with a stored PhiSpace modelpredict.PhiSpaceModel
Print method for PhiSpaceClustering objectsprint.PhiSpaceClustering
Converting single cells to pseudo-bulks.pseudoBulk
Rank Features by Discriminative PowerrankFeatures
Rank transform of a 'SingleCellExperiment' object.RankTransf
Turn a matrix to a data.frame withe newly defined colnames.reNameCols
Apply rank transform to a gene by cell matrix.RTassay
Save spatial cell type annotation heatmapssaveCellTypeMaps
Convert PhiSpace Scores to ProbabilitiesScore2Prob
Score query cells against reference classesscoreCells
Run scran normalisationscranTransf
Select nfeat top features from each column (label) of impScoresselectFeat
Spatial smoothing of gene expression using KNN with kernel weightingspatial_smooth_expression
Spatially-aware subsampling of SpatialExperiment objectsspatialSampler
Spatial smoother wrapper for SpatialExperiment and SingleCellExperiment objectsspatialSmoother
Create partitions of data for cross-validation.split2
Subsample from a sce objectsubsample
Summary method for PhiSpaceClustering objectssummary.PhiSpaceClustering
Compute regression model using selected features.SuperPC
Train a PhiSpace model from a referencetrainPhiSpace
Translate cell type labels from finer to coarser according to a dictionary.translateLabel
Tune ncomp and nfeat by cross-validationtunePhiSpace
Visualising features (eg gene expression), metadata (eg cell type) or reducedDim component (eg PhiSpace cell type score) in 2D tissue space.VizSpatial
Minimal quality control (QC): remove features with all zero values.zeroFeatQC