Package: phenoscapR 0.2.0.9001

R. Heller

phenoscapR: Read, Analyse, and Visualise Single-Cell Spatial Biology Data

Tools for importing, processing, analysing, and visualising single-cell spatial biology data from multiplexed imaging platforms. Supports cell-table quality control, marker normalisation, phenotype summaries, spatial neighbourhood statistics such as Ripley's K function (Ripley (1977) <doi:10.1111/j.2517-6161.1977.tb01615.x>) and Moran's I (Moran (1950) <doi:10.2307/2332142>), and explicit sample and coordinate-frame registries. Patient-level inference enumerates label allocations for declared contrasts (exact permutation tests; Pitman (1937) <doi:10.2307/2984124>) and retains unavailable hypotheses when adjusting for multiple testing. Grouped summaries expose missingness, eligibility, and denominator provenance. Optional canonical cell-table import uses 'cellspecR' <https://github.com/CTTIR/cellspecR>; optional Self-Organising Nebulous Growths (SONG) embeddings (Senanayake et al. (2021) <doi:10.1109/TNNLS.2020.3023941>) use 'songR' <https://github.com/CTTIR/songR>. Both optional packages are available from <https://cttir.r-universe.dev>.

Authors:R. Heller [aut, cre, cph], E. Chteinberg [aut, cph], H. Witte [aut, cph]

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

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

Bug tracker:https://github.com/cttir/phenoscapr/issues

Pkgdown/docs site:https://cttir.github.io

Datasets:

On CRAN:

Conda:

bioinformaticsdata-visualizationggplot2single-cellspatial-proteomics

5.00 score 1 stars 1 packages 11 scripts 195 exports 23 dependencies

Last updated from:72fb1bc9bc. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK404
source / vignettesOK406
linux-releaseOK382
macos-releaseOK299
macos-oldrelOK277
windows-develOK359
windows-releaseOK351
windows-oldrelOK348
wasm-releaseOK140

Exports:AdjustPatientFamiliesAlterationMatrixDataAnnotateClustersAnnotationTracksApplyGroupedThresholdsas_Seuratas_SpatialCellDataas_SpatialExperimentAssemblePairedSummariesAssignFixedGridBestSubWindowBootstrapMedianIntervalBoxPlotBuildExactDelaunayEdgescell_densityCellDensityCellMapCellMapDataCellPositionsForCellularNeighbourhoodsClusterLabelPositionsCompareArraysCompareTablesCompleteRegisteredValuesComposeFigureCompositeFieldsCompositionPlotContrastGroupedOverlapContrastGroupedRanksContrastPatientEndpointsCoordsCorrelateGroupedRanksCountDisjointEdgesCountRadiusSetsCreateSpatialObjectCrossNNDistanceCustomGradientDelaunayNetworkDensestGridWindowDensityLevelContourDensityPlotDifferentialAbundanceDimPlotDotPlotEmbeddingLayersEmbeddingLimitsEmbeddingPlotEmbeddingsExactPairedTestsExactPatientTestsExactPermutationBoundExpressionClustersFeaturePlotFieldCellsRankedFieldCentreFigureGrammarsFigureGrobFigurePanelFigureTextFindNeighboursFormatPFormatStatisticFormatTemplateFromCellspecGetDataGetPaletteHistogramPlotIdentsinteraction_matrixInteractionMatrixInteractionPlotLeaveOnePatientOutLegendKeysLookupNestedRowsManuscriptPalettesManuscriptStyleMarkerHeatmapMarkersMetaMoransINCellsnearest_neighboursNearestLabelDistanceNearestPartnerPairsNeighbourhoodEnrichmentNeighbourTypeCountsNiceBreaksNMarkersnormalise_markersNormaliseDataPairCorrelationPairedDifferencesPaletteContinuousPaletteDiscretePermutationCorrelationphenotype_cellsPhenotypeCellsPhenotypeSummaryPlanExactDelaunayWorkspaceplot_cell_mapplot_densityplot_heatmapplot_interactionsPlotAlterationMatrixPlotAnnotatedHeatmapPlotBandProfilesPlotBarsPlotCellMapPlotDataBindColumnsPlotDataBindRowsPlotDataCollapsePlotDataConstantPlotDataContrastSummaryPlotDataCountPlotDataCrossSharesPlotDataDirectionPlotDataDominantPlotDataFromArraysPlotDataJoinPlotDataKeyColoursPlotDataLabelsPlotDataLongerPlotDataMembershipPlotDataPairRatioPlotDataProductPlotDataQuantilesPlotDataRankRowsPlotDataRatioPlotDataRecodePlotDataRelativePlotDataSelectPlotDataSharesPlotDataSummarisePlotDataTableCellsPlotDataUnitePlotDensityOutlinesPlotDotMatrixPlotEmbeddingPlotFluorescenceFieldPlotGroupDifferencesPlotGroupStripPlotImagePlotIntervalForestPlotPairedPatientsPlotQuantileCurvesPlotScatterGroupsPlotStackedBarsPlotTerritoriesPlotTextBlockPlotVolcanoProjectSpatialTablePtLinewidthqc_filterQCFilterQCPlotQuadratAnalysisread_spatialReadCosMxReadFigureSpecReadMatrixCoordsReadMERSCOPEReadPlotTableReadSpatialReadXeniumReductionsRenderFigureRidgePlotRipleysKrun_appRunPCARunSONGRunTSNERunUMAPSaveFigureSchematicShapesScreePlotSetPaletteshowspatial_clustersSpatialClustersSpatialDomainsSpatialNetworkPlotsummarise_phenotypesSummarizeCellCompositionSummarizeComparisonsSummarizeFixedGridSummarizeGroupedCountFractionsSummarizeGroupedValuesSummarizeNearestDistancesTerritoryTilesThemeManuscriptTypesetLabelVarianceExplainedViolinPlotWriteFigure

Dependencies:clicpp11data.tabledbscandigestfarvergenericsggplot2gluegtableisobandlabelinglifecyclepngR6RColorBrewerRcpprlangS7scalesvctrsviridisLitewithr

Advanced Capabilities
A coherent result API | Per-sample analysis | Rigorous statistics | PCA variance | Higher-order spatial structure | Cellular neighbourhoods (niches) | Spatial domains | Unsupervised phenotyping | Differential abundance | Platform readers | Ecosystem interop | See also

Last update: 2026-11-03
Started: 2026-06-12

Advanced Spatial Analysis
Overview | One sample at a time | Neighbourhood enrichment | Ripley's K and L | Pair correlation function | Moran's I | Quadrat analysis | Cross nearest-neighbour distance | Delaunay contact network | Expression clustering | Choosing a statistic | Next steps

Last update: 2026-11-03
Started: 2026-05-04

Getting Started with phenoscapR
Overview | The bundled example dataset | 1. Quality control | 2. Normalisation | 3. Phenotyping | 4. The phenotype map | 5. Spatial analysis | Local density and nearest neighbours | Phenotype interactions | Marker signatures per phenotype | Where to next

Last update: 2026-11-03
Started: 2026-05-04

Visualisation Gallery
Overview | Tissue maps | CellMap() — phenotype map | FeaturePlot() — marker intensity in space | DensityPlot() — local cell density | SpatialNetworkPlot() — cell-contact graph | Marker distributions | ViolinPlot() and BoxPlot() | RidgePlot() and HistogramPlot() | DotPlot() — mean expression × fraction expressing | Summaries | MarkerHeatmap() — phenotype signatures | CompositionPlot() — phenotype proportions | InteractionPlot() — co-localisation scores | QCPlot() — any metadata pair | Dimensionality reductions | Theming and palettes | See also

Last update: 2026-11-03
Started: 2026-06-12

The SpatialCellData Object
Overview | Construction | From raw matrices | From CSV files | A worked object | Inspecting the object | Accessing expression data | Working with metadata | Subsetting | Next steps

Last update: 2026-10-28
Started: 2026-05-04

Readme and manuals

Help Manual

Help pageTopics
Subset a SpatialCellData Object[,SpatialCellData-method
Access Metadata Columns with [[[[,SpatialCellData-method
Access Metadata Columns with $$,SpatialCellData-method
Adjust Explicitly Declared Patient-Test FamiliesAdjustPatientFamilies
Alteration Classes for an Alteration MatrixAlterationMatrixData
Annotate Clusters by Their Top MarkersAnnotateClusters
Coloured Annotation TracksAnnotationTracks
Apply Supplied Group Thresholds to ObservationsApplyGroupedThresholds
Convert a SpatialCellData to a Seurat Objectas_Seurat
Convert a Seurat or SpatialExperiment Object to SpatialCellDataas_SpatialCellData
Convert a SpatialCellData to a SpatialExperiment Objectas_SpatialExperiment
Assemble Registered Paired SummariesAssemblePairedSummaries
Assign Physical Cell Coordinates to Fixed Square GridsAssignFixedGrid
Sub-Window with the Most Cells of a KindBestSubWindow
Bootstrap Percentile Interval of a MedianBootstrapMedianInterval
Box Plot of Marker ExpressionBoxPlot
Build Explicitly Ordered Delaunay GraphsBuildExactDelaunayEdges
Compute Cell Densitycell_density
Cell Density (SpatialCellData)CellDensity
Plot Cell MapCellMap
Cells of a Map Field or Whole SectionCellMapData
Attach Cell Positions to a Table of Cell ReferencesCellPositionsFor
Cellular Neighbourhoods (Niches)CellularNeighbourhoods
Label Positions of Clusters on an EmbeddingClusterLabelPositions
Compare Table Columns or Arrays with Arrays of a NumPy ArchiveCompareArrays
Compare a Recomputed Table with a Reference Table by KeyCompareTables
Complete Numeric Observations Against an Explicit RegistryCompleteRegisteredValues
Compose a Multi-Panel FigureComposeFigure
Composite Fluorescence Images from Channel FieldsCompositeFields
Stacked Bar Plot of Phenotype CompositionCompositionPlot
Contrast Explicit Groups Within Finite-Metric Overlap StrataContrastGroupedOverlap
Compare Two Distributions Within Explicit GroupsContrastGroupedRanks
Exact Two-Group Contrasts for a Registry of Patient EndpointsContrastPatientEndpoints
Get Spatial CoordinatesCoords Coords,SpatialCellData-method
Correlate Paired Ranks Within Explicit GroupsCorrelateGroupedRanks
Count Undirected Edges Between Disjoint Node SetsCountDisjointEdges
Count Reference Sets Within Explicit Euclidean RadiiCountRadiusSets
Create a SpatialCellData Object from Existing DataCreateSpatialObject
Cross Nearest Neighbour DistanceCrossNNDistance
Create a Custom Gradient Palette from Anchor ColoursCustomGradient
Delaunay Triangulation NetworkDelaunayNetwork
Centre of the Densest Grid WindowDensestGridWindow
Density Level Region of Each Group on an EmbeddingDensityLevelContour
Plot Cell DensityDensityPlot
Differential Abundance of Phenotypes Across ConditionsDifferentialAbundance
Get Dimensions of a SpatialCellData Objectdim,SpatialCellData-method
Dot Plot of Marker ExpressionDotPlot
Layered Point Data for an EmbeddingEmbeddingLayers
Display Limits of an EmbeddingEmbeddingLimits
Plot a Dimensionality-Reduction EmbeddingDimPlot EmbeddingPlot
Get a Dimensionality-Reduction EmbeddingEmbeddings Embeddings,SpatialCellData-method
Exact Paired Sign-Flip Tests of Within-Subject DifferencesExactPairedTests
Exact Allocation Tests of Independent Patient EndpointsExactPatientTests
Lower Bound of an Exact Two-Sided Permutation P ValueExactPermutationBound
Expression-Based Cell ClusteringExpressionClusters
Feature Plot in Tissue SpaceFeaturePlot
Cells of One Type inside a Field, RankedFieldCellsRanked
Field Centre as Plot DataFieldCentre
Figure Plot Builders Available to Figure SpecificationsFigureGrammars
Place a Grob on a Figure PageFigureGrob
Describe One Figure PanelFigurePanel
Place Text on a Figure PageFigureText
Find Nearest Neighbours (SpatialCellData)FindNeighbours
Format P Values for FiguresFormatP
Format a Patient-Level Statistic LineFormatStatistic
Fill Text Templates from Table RowsFormatTemplate
Import a Canonical Cell Table Without Losing Spatial IdentityFromCellspec
Get Expression DataGetData GetData,SpatialCellData-method
Histogram of Marker ExpressionHistogramPlot
Get Active Cell IdentitiesIdents Idents,SpatialCellData-method
Spatial Interaction Matrixinteraction_matrix
Interaction Matrix (SpatialCellData)InteractionMatrix
Plot Spatial Interaction HeatmapInteractionPlot
Exact Patient Omission Diagnostics for Declared HypothesesLeaveOnePatientOut
Legend Keys as a GrobLegendKeys
Look Up Values Stored on Nested Row SubsetsLookupNestedRows
Manuscript PalettesManuscriptPalettes
Manuscript Figure StyleManuscriptStyle
Plot Marker HeatmapMarkerHeatmap
Get Marker NamesMarkers Markers,SpatialCellData-method
Get or Set Cell MetadataMeta Meta,SpatialCellData-method
Moran's I Spatial AutocorrelationMoransI
Get the Number of CellsNCells NCells,SpatialCellData-method
Compute Nearest Neighbour Distancesnearest_neighbours
Distance to the Nearest Cell of Given LabelsNearestLabelDistance
Cells Paired with Their Nearest Partner CellNearestPartnerPairs
Neighbourhood Enrichment AnalysisNeighbourhoodEnrichment
Count Neighbour Types over a Delaunay Graph with an Edge-Length CutNeighbourTypeCounts
Tick Breaks of Common Plotting CodeNiceBreaks
Get the Number of MarkersNMarkers NMarkers,SpatialCellData-method
Normalise Marker Intensitiesnormalise_markers
Normalise Marker Intensities (SpatialCellData)NormaliseData
Pair Correlation FunctionPairCorrelation
Build Paired Differences from Wide Subject TablesPairedDifferences
Generate a Continuous Colour Palette FunctionPaletteContinuous
Generate Discrete ColoursPaletteDiscrete
Permutation Test of a Rank or Linear CorrelationPermutationCorrelation
Synthetic multiplexed-imaging example datasetphenoscapR_example
Phenotype Cells by Marker Thresholdsphenotype_cells
Phenotype Cells (SpatialCellData)PhenotypeCells
Phenotype Summary (SpatialCellData)PhenotypeSummary
Preflight Integer Workspace Bounds for Exact Delaunay ConstructionPlanExactDelaunayWorkspace
Plot Cell Mapplot_cell_map
Plot Density Mapplot_density
Plot Marker Heatmapplot_heatmap
Plot Interaction Heatmapplot_interactions
Alteration MatrixPlotAlterationMatrix
Annotated HeatmapPlotAnnotatedHeatmap
Profiles over Ordered CategoriesPlotBandProfiles
Bars per UnitPlotBars
Cell MapPlotCellMap
Bind Plot Data TablesPlotDataBindColumns PlotDataBindRows
Add a Constant ColumnPlotDataConstant
Summary of a Family of Two-Group TestsPlotDataContrastSummary
Counts and Shares by GroupPlotDataCount
Shares of One Category within AnotherPlotDataCrossShares
Count of Units in the Direction of an EstimatePlotDataDirection
Order Groups by Their Dominant CategoryPlotDataDominant
Table from a List of ArraysPlotDataFromArrays
Join Columns of Another TablePlotDataJoin
Key Colours from a Categorical PalettePlotDataKeyColours
Text Labels from Table RowsPlotDataCollapse PlotDataLabels
Reshape Wide Columns into Long Plot DataPlotDataLonger
Flag Rows Whose Key Occurs in Another TablePlotDataMembership
Ratios Between Two Levels of a Key ColumnPlotDataPairRatio
Product of ColumnsPlotDataProduct
Quantile Summaries of Plot DataPlotDataQuantiles
Rank Rows by the Sum of Selected ColumnsPlotDataRankRows
Ratios Between ColumnsPlotDataRatio
Recode the Values of a ColumnPlotDataRecode
Scale a Column to a Reference RowPlotDataRelative
Select Rows and Columns of Plot DataPlotDataSelect
Shares of a Total in Several ColumnsPlotDataShares
Summarise Columns by GroupPlotDataSummarise
Text-Table Cells from a Per-Unit TablePlotDataTableCells
Paste Columns into a Key ColumnPlotDataUnite
Density Outlines on an EmbeddingPlotDensityOutlines
Dot MatrixPlotDotMatrix
Embedding ScatterPlotEmbedding
Multichannel Fluorescence FieldPlotFluorescenceField
Differences Between Groups as SegmentsPlotGroupDifferences
Unit Values by GroupPlotGroupStrip
Image, Image Gallery or SchematicPlotImage
Interval Forest with Unit ValuesPlotIntervalForest
Paired Patient LinesPlotPairedPatients
Summary Curves with Quantile BandsPlotQuantileCurves
Scatter or Dot Rows Coloured by GroupPlotScatterGroups
Stacked BarsPlotStackedBars
Cell Territory MapPlotTerritories
Text Block or Text TablePlotTextBlock
Volcano Plot of Exact Group TestsPlotVolcano
Project Spatial Tables Without Changing Column MetadataProjectSpatialTable
Convert Points to a 'ggplot2' Line WidthPtLinewidth
Quality Control Filterqc_filter
Quality Control Filter (SpatialCellData)QCFilter
QC Scatter PlotQCPlot
Quadrat AnalysisQuadratAnalysis
Read Single-Cell Spatial Biology Dataread_spatial
Read NanoString CosMx Cell OutputReadCosMx
Read a Figure SpecificationReadFigureSpec
Read an Expression Matrix and a Coordinate/Metadata TableReadMatrixCoords
Read Vizgen MERSCOPE Cell OutputReadMERSCOPE
Read a Plot Data TableReadPlotTable
Read Cell Segmentation Data into a SpatialCellData ObjectReadSpatial
Read 10x Xenium Cell OutputReadXenium
List Available ReductionsReductions Reductions,SpatialCellData-method
Render a Figure from a SpecificationRenderFigure
Ridge Plot of Marker ExpressionRidgePlot
Ripley's K FunctionRipleysK
Launch the phenoscapR Shiny Applicationrun_app
Principal Component AnalysisRunPCA
SONG EmbeddingRunSONG
t-SNE EmbeddingRunTSNE
UMAP EmbeddingRunUMAP
Save a Composed Figure as PDF and PNGSaveFigure
Schematic Shapes from a SpecificationSchematicShapes
Scree Plot of PCA VarianceScreePlot
Set or Get the Default Colour PaletteGetPalette SetPalette
Show a SpatialCellData Objectshow,SpatialCellData-method
Spatial Cell Clusteringspatial_clusters
The SpatialCellData ClassSpatialCellData-class
Spatial Clusters (SpatialCellData)SpatialClusters
Spatial DomainsSpatialDomains
Plot Spatial NetworkSpatialNetworkPlot
Summarise Phenotype Proportionssummarise_phenotypes
Cell-Type Composition, Densities and Declared State Fractions of a SectionSummarizeCellComposition
Summarise Comparison Results into Pass/Fail ChecksSummarizeComparisons
Summarize Cell Annotations Within Fixed GridsSummarizeFixedGrid
Summarize Grouped Subset Counts as FractionsSummarizeGroupedCountFractions
Summarize Continuous Observations in Explicit GroupsSummarizeGroupedValues
Nearest-Target Distances Summarised per Cell SetSummarizeNearestDistances
Voronoi Territory Tiles of the Cells in a FieldTerritoryTiles
Manuscript 'ggplot2' ThemeThemeManuscript
Typeset Figure TextTypesetLabel
Variance Explained by Principal ComponentsVarianceExplained
Violin Plot of Marker ExpressionViolinPlot
Write a Figure from a SpecificationWriteFigure