From 4f6bfa72af7289a548c7581fa90477665a330335 Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:30:59 -0500 Subject: [PATCH 1/6] Update dimension_reduction.R --- R/dimension_reduction.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/dimension_reduction.R b/R/dimension_reduction.R index 79d9be813..1462f24a9 100644 --- a/R/dimension_reduction.R +++ b/R/dimension_reduction.R @@ -688,7 +688,7 @@ runPCA_BiocSingular_irlba_projection = function(x, #' @param feat_type feature type #' @param expression_values expression values to use #' @param reduction cells or genes -#' @param random_subset random subset to perform PCA on +#' @param random_subset numeric. random subset to perform PCA on #' @param name arbitrary name for PCA run #' @param feats_to_use subset of features to use for PCA #' @param return_gobject boolean: return giotto object (default = TRUE) From 87dc495b16858372e540dc2aed2e89c0d641d9d6 Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:51:44 -0500 Subject: [PATCH 2/6] Update differential_expression.R make sure that scran pkg citation is shown by default --- R/differential_expression.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/differential_expression.R b/R/differential_expression.R index ca69f1535..044d049b7 100644 --- a/R/differential_expression.R +++ b/R/differential_expression.R @@ -38,7 +38,7 @@ findScranMarkers <- function(gobject, group_1_name = NULL, group_2 = NULL, group_2_name = NULL, - verbose = FALSE, + verbose = TRUE, ...) { @@ -47,10 +47,12 @@ findScranMarkers <- function(gobject, # print message with information # - if(verbose) wrap_msg("using 'Scran' to detect marker genes. If used in published research, please cite: + if(isTRUE(verbose)) { + wrap_msg("Using 'Scran' to detect marker genes. If used in published research, please cite: Lun ATL, McCarthy DJ, Marioni JC (2016). 'A step-by-step workflow for low-level analysis of single-cell RNA-seq data with Bioconductor.' - F1000Res., 5, 2122. doi: 10.12688/f1000research.9501.2. ") + F1000Res., 5, 2122. doi: 10.12688/f1000research.9501.2.") + } # Set feat_type and spat_unit From 8969835b1f1b80adef51de078396f91c9fc2d35f Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:00:32 -0500 Subject: [PATCH 3/6] version bump --- DESCRIPTION | 2 +- NEWS.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 39bd5d889..5ae04677d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: Giotto Title: Spatial Single-Cell Transcriptomics Toolbox -Version: 3.3.2 +Version: 4.0.0 Authors@R: c( person("Ruben", "Dries", email = "rubendries@gmail.com", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index d4f724c0e..d448fd14f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ -# Giotto Suite 3.3.2 (Release TBD) +# Giotto Suite 4.0.0 2023*11*29) ## Breaking Changes +* Update to modular package organization with the main packages being `GiottoUtils`, `GiottoClass`, `GiottoVisuals`, and `Giotto` as the analytical umbrella package. ## Added @@ -15,7 +16,6 @@ ## Changes -* Improved performance of gefToGiotto() # Giotto Suite 3.3.1 (2023*08*02) From cf537e015f046cb5adcbc3ddbbcbce740f1cda38 Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:04:19 -0500 Subject: [PATCH 4/6] run document --- man/findScranMarkers.Rd | 2 +- man/reexports.Rd | 2 +- man/runPCAprojection.Rd | 2 +- tests/testthat/test_mini_vizgen.R | 314 ++++++++++++++++++++++++++++++ 4 files changed, 317 insertions(+), 3 deletions(-) create mode 100644 tests/testthat/test_mini_vizgen.R diff --git a/man/findScranMarkers.Rd b/man/findScranMarkers.Rd index 84f39d7b7..b35d9b18c 100644 --- a/man/findScranMarkers.Rd +++ b/man/findScranMarkers.Rd @@ -15,7 +15,7 @@ findScranMarkers( group_1_name = NULL, group_2 = NULL, group_2_name = NULL, - verbose = FALSE, + verbose = TRUE, ... ) } diff --git a/man/reexports.Rd b/man/reexports.Rd index 01e774cb3..6c9417f73 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -206,7 +206,7 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} + \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass:addGiottoPoints]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} \item{GiottoUtils}{\code{\link[GiottoUtils:pipe]{\%>\%}}} diff --git a/man/runPCAprojection.Rd b/man/runPCAprojection.Rd index bdf95f934..ae2546d97 100644 --- a/man/runPCAprojection.Rd +++ b/man/runPCAprojection.Rd @@ -37,7 +37,7 @@ runPCAprojection( \item{reduction}{cells or genes} -\item{random_subset}{random subset to perform PCA on} +\item{random_subset}{numeric. random subset to perform PCA on} \item{name}{arbitrary name for PCA run} diff --git a/tests/testthat/test_mini_vizgen.R b/tests/testthat/test_mini_vizgen.R new file mode 100644 index 000000000..fa1a58f85 --- /dev/null +++ b/tests/testthat/test_mini_vizgen.R @@ -0,0 +1,314 @@ +# Continuing on from GiottoClass mini vizgen + +options('giotto.use_conda' = FALSE) +g <- GiottoData::loadGiottoMini('vizgen') + +# reset portions of object to before aggregate spat_unit filtering and normalization + + + +# 5. normalize on aggregated layer ##### +# ----------------------------------- ## + +# rna data, default. +# other feature modalities can be processed and filtered in an anologous manner +vizsubc <- normalizeGiotto(gobject = vizsubc, spat_unit = 'aggregate', + scalefactor = 5000, verbose = T) +vizsubc <- addStatistics(gobject = vizsubc, spat_unit = 'aggregate') +vizsubc <- normalizeGiotto(gobject = vizsubc, spat_unit = 'aggregate', + norm_methods = 'pearson_resid', update_slot = 'pearson') + + +# 6. highly variable genes #### +# ----------------------------- # + +# typical way of calculating HVG +vizsubc <- calculateHVF(gobject = vizsubc, spat_unit = 'aggregate', HVFname = 'hvg_orig') + +# new method based on variance of pearson residuals for each gene +vizsubc <- calculateHVF(gobject = vizsubc, + spat_unit = 'aggregate', + method = 'var_p_resid', + expression_values = 'pearson', + show_plot = T) + + + +# 7. dimension reduction #### +# --------------------------- # + +# ** 7.1 PCA #### + +# we will run pca on the pre-scaled matrix from the pearson residual normalization +# if features are not specified it will automatically search for the hvf column in the feature metadata + +vizsubc <- runPCA(gobject = vizsubc, + spat_unit = 'aggregate', + expression_values = 'pearson', + scale_unit = F, center = F) + +screePlot(vizsubc, + ncp = 20, + spat_unit = 'aggregate') + +showGiottoDimRed(vizsubc) + +plotPCA(vizsubc, + spat_unit = 'aggregate', + dim_reduction_name = 'pca', + dim1_to_use = 1, + dim2_to_use = 2) + + +# ** 7.2 UMAP and TSN #### +vizsubc <- runUMAP(vizsubc, dimensions_to_use = 1:8, n_threads = 4, spat_unit = 'aggregate') +plotUMAP(gobject = vizsubc, spat_unit = 'aggregate') + +vizsubc <- runtSNE(vizsubc, dimensions_to_use = 1:8, spat_unit = 'aggregate') +plotTSNE(gobject = vizsubc, spat_unit = 'aggregate') + + +# 8. graph-based clustering #### +# ---------------------------- # +vizsubc <- createNearestNetwork(gobject = vizsubc, dimensions_to_use = 1:8, k = 10, + spat_unit = 'aggregate') +vizsubc <- doLeidenCluster(gobject = vizsubc, resolution = 0.05, n_iterations = 1000, + spat_unit = 'aggregate') +vizsubc <- doLouvainCluster(gobject = vizsubc, resolution = 5, + spat_unit = 'aggregate') + + +# visualize UMAP / TSNE cluster results +plotUMAP(gobject = vizsubc, + spat_unit = 'aggregate', + cell_color = 'leiden_clus', + show_NN_network = T, + point_size = 2.5) + +spatInSituPlotPoints(vizsubc, + show_polygon = TRUE, + spat_unit = 'aggregate', + polygon_feat_type = 'aggregate', + polygon_color = 'white', + polygon_line_size = 0.1, + polygon_fill = 'leiden_clus', + polygon_fill_as_factor = T, + coord_fix_ratio = T) + +plotTSNE(gobject = vizsubc, + spat_unit = 'aggregate', + cell_color = 'louvain_clus', + show_NN_network = T, + point_size = 2.5) + +spatInSituPlotPoints(vizsubc, + show_polygon = TRUE, + spat_unit = 'aggregate', + polygon_feat_type = 'aggregate', + polygon_color = 'white', + polygon_line_size = 0.1, + polygon_fill = 'louvain_clus', + polygon_fill_as_factor = T, + coord_fix_ratio = T) + +spatInSituPlotPoints(vizsubc, + spat_unit = 'aggregate', + show_image = T, + largeImage_name = 'dapi_z0', + feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), + feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), + point_size = 0.35, + show_polygon = TRUE, + polygon_feat_type = 'aggregate', + polygon_color = 'white', + polygon_line_size = 0.1, + polygon_fill = 'leiden_clus', + polygon_fill_as_factor = T, + coord_fix_ratio = TRUE) + + + + +# 9. spatial network #### +# --------------------- # +# defaults to delaunay +vizsubc = createSpatialNetwork(vizsubc, spat_unit = 'aggregate') +# kNN with k of 8 nearest +vizsubc = createSpatialNetwork(vizsubc, spat_unit = 'aggregate', method = 'kNN', k = 8) +# create spatial weight matrix +vizsubc = createSpatialWeightMatrix(vizsubc, + spat_unit = 'aggregate', + method = 'distance', + spatial_network_to_use = 'kNN_network', + return_gobject = TRUE) + +pDataDT(vizsubc, 'aggregate') +spatPlot(gobject = vizsubc, + spat_unit = 'aggregate', + show_network = T, + network_color = 'lightgray', + spatial_network_name = 'Delaunay_network', + point_size = 2.5, + cell_color = 'leiden_clus') + + +## 9.1 spatial genes #### +km_spatialfeats = binSpect(vizsubc, spat_unit = 'aggregate') + +spatFeatPlot2D_single(vizsubc, + spat_unit = 'aggregate', + expression_values = 'scaled', + feats = km_spatialfeats[1:4]$feats, + point_shape = 'border', + point_border_stroke = 0.1, + show_network = F, + network_color = 'lightgrey', + point_size = 2.5, + cow_n_col = 2) + +## 9.2 spatial co-expression #### +# here we use existing detectSpatialCorGenes function to calculate pairwise distances between genes +ext_spatial_genes = km_spatialfeats[1:200,]$feats +spat_cor_netw_DT = detectSpatialCorFeats(vizsubc, + spat_unit = 'aggregate', + method = 'network', + spatial_network_name = 'Delaunay_network', + subset_feats = ext_spatial_genes) + +# cluster and visualize spatial co-expression genes +spat_cor_netw_DT = clusterSpatialCorFeats(spat_cor_netw_DT, + name = 'spat_netw_clus', + k = 5) + +heatmSpatialCorFeats(vizsubc, + spatCorObject = spat_cor_netw_DT, + use_clus_name = 'spat_netw_clus', + heatmap_legend_param = list(title = NULL), + save_param = list(base_height = 6, + base_width = 8, + units = 'cm')) + +# create and visualize metafeatures +testweight = getBalancedSpatCoexpressionFeats(spat_cor_netw_DT, rank = 'weighted', maximum = 30) + +vizsubc = createMetafeats(vizsubc, + spat_unit = 'aggregate', + feat_clusters = testweight, + name = 'cluster_metagene') + +spatCellPlot(vizsubc, + spat_unit = 'aggregate', + spat_enr_names = 'cluster_metagene', + cell_annotation_values = as.character(c(1:6)), + gradient_style = 's', + point_size = 1.8, + save_param = list(base_width = 15)) + + + +## 9.3 spatial structure #### +cell_proximities = cellProximityEnrichment(gobject = vizsubc, + spat_unit = 'aggregate', + cluster_column = 'leiden_clus', + spatial_network_name = 'Delaunay_network', + adjust_method = 'fdr', + number_of_simulations = 2000) +## barplot +cellProximityBarplot(gobject = vizsubc, + CPscore = cell_proximities, + min_orig_ints = 5, min_sim_ints = 5) + +## heatmap +cellProximityHeatmap(gobject = vizsubc, + CPscore = cell_proximities, + order_cell_types = T, scale = T, + color_breaks = c(-1.5, 0, 1.5), + color_names = c('blue', 'white', 'red')) + +spatInSituPlotPoints( + vizsubc, + spat_unit = 'aggregate', + show_image = T, + largeImage_name = 'dapi_z0', + feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), + feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), + point_size = 0.75, + show_polygon = TRUE, + polygon_feat_type = 'aggregate', + polygon_color = 'white', + polygon_line_size = 0.1, + polygon_fill = 'leiden_clus', + polygon_fill_as_factor = T, + coord_fix_ratio = 1 +) + +showGiottoSpatialInfo(vizsubc) + + +spatInSituPlotDensity(vizsubc, + polygon_feat_type = 'aggregate', + feats = c("Htr1b", "Ackr1", "Epha7"), + alpha = 0.5, + polygon_color = 'white') + +spatInSituPlotHex(vizsubc, + polygon_feat_type = 'aggregate', + feats = c("Htr1b", "Ackr1", "Epha7")) + + + +# 10. save Giotto object #### +# ------------------------- # +format(object.size(vizsubc), units = 'Mb') + +# you need to use your local GiottoData repo +# giottodata_repo = '/Users/rubendries/Packages/R_Packages/GiottoData/inst/Mini_datasets/' +giottodata_repo = '/Users/rubendries/r_packages/GiottoData//inst/Mini_datasets/' + +saveGiotto(vizsubc, + foldername = 'VizgenObject', + #dir = paste0(system.file(package = 'GiottoData'),'/', 'Mini_datasets/Vizgen/'), + dir = paste0(giottodata_repo, '/', 'Vizgen/'), + overwrite = TRUE) + +pDataDT(vizsubc, spat_unit = 'aggregate') +pDataDT(vizsubc, spat_unit = 'aggregate') + + + +## some quick tests ## +gvizg = loadGiotto(path_to_folder = system.file('/Mini_datasets/Vizgen/VizgenObject/', + package = 'GiottoData')) + + +# subsetting +selected_ids = pDataDT(gvizg)$cell_ID[1:100] + +# important to specify which spatial_unit to use and which polygon information slots to update +mySubset <- subsetGiotto(gobject = gvizg, + cell_ids = selected_ids, + spat_unit = 'aggregate', + poly_info = c('aggregate')) + +pDataDT(mySubset, 'aggregate') +fDataDT(mySubset) + +spatInSituPlotPoints(mySubset, + spat_unit = 'aggregate', + show_image = T, + largeImage_name = 'dapi_z0', + feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), + feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), + point_size = 0.35, + show_polygon = TRUE, + polygon_feat_type = 'aggregate', + polygon_color = 'white', + polygon_line_size = 0.1, + polygon_fill = 'leiden_clus', + polygon_fill_as_factor = T, + coord_fix_ratio = TRUE) + + +spatPlot(gobject = mySubset, spat_unit = 'aggregate', show_network = T, + network_color = 'lightgray', spatial_network_name = 'Delaunay_network', + point_size = 2.5, cell_color = 'leiden_clus') From c2db30dff8225a2b668c1c3e8eb5b96fe2211f57 Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:06:13 -0500 Subject: [PATCH 5/6] Revert "run document" This reverts commit cf537e015f046cb5adcbc3ddbbcbce740f1cda38. --- man/findScranMarkers.Rd | 2 +- man/reexports.Rd | 2 +- man/runPCAprojection.Rd | 2 +- tests/testthat/test_mini_vizgen.R | 314 ------------------------------ 4 files changed, 3 insertions(+), 317 deletions(-) delete mode 100644 tests/testthat/test_mini_vizgen.R diff --git a/man/findScranMarkers.Rd b/man/findScranMarkers.Rd index b35d9b18c..84f39d7b7 100644 --- a/man/findScranMarkers.Rd +++ b/man/findScranMarkers.Rd @@ -15,7 +15,7 @@ findScranMarkers( group_1_name = NULL, group_2 = NULL, group_2_name = NULL, - verbose = TRUE, + verbose = FALSE, ... ) } diff --git a/man/reexports.Rd b/man/reexports.Rd index 6c9417f73..01e774cb3 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -206,7 +206,7 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass:addGiottoPoints]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} + \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} \item{GiottoUtils}{\code{\link[GiottoUtils:pipe]{\%>\%}}} diff --git a/man/runPCAprojection.Rd b/man/runPCAprojection.Rd index ae2546d97..bdf95f934 100644 --- a/man/runPCAprojection.Rd +++ b/man/runPCAprojection.Rd @@ -37,7 +37,7 @@ runPCAprojection( \item{reduction}{cells or genes} -\item{random_subset}{numeric. random subset to perform PCA on} +\item{random_subset}{random subset to perform PCA on} \item{name}{arbitrary name for PCA run} diff --git a/tests/testthat/test_mini_vizgen.R b/tests/testthat/test_mini_vizgen.R deleted file mode 100644 index fa1a58f85..000000000 --- a/tests/testthat/test_mini_vizgen.R +++ /dev/null @@ -1,314 +0,0 @@ -# Continuing on from GiottoClass mini vizgen - -options('giotto.use_conda' = FALSE) -g <- GiottoData::loadGiottoMini('vizgen') - -# reset portions of object to before aggregate spat_unit filtering and normalization - - - -# 5. normalize on aggregated layer ##### -# ----------------------------------- ## - -# rna data, default. -# other feature modalities can be processed and filtered in an anologous manner -vizsubc <- normalizeGiotto(gobject = vizsubc, spat_unit = 'aggregate', - scalefactor = 5000, verbose = T) -vizsubc <- addStatistics(gobject = vizsubc, spat_unit = 'aggregate') -vizsubc <- normalizeGiotto(gobject = vizsubc, spat_unit = 'aggregate', - norm_methods = 'pearson_resid', update_slot = 'pearson') - - -# 6. highly variable genes #### -# ----------------------------- # - -# typical way of calculating HVG -vizsubc <- calculateHVF(gobject = vizsubc, spat_unit = 'aggregate', HVFname = 'hvg_orig') - -# new method based on variance of pearson residuals for each gene -vizsubc <- calculateHVF(gobject = vizsubc, - spat_unit = 'aggregate', - method = 'var_p_resid', - expression_values = 'pearson', - show_plot = T) - - - -# 7. dimension reduction #### -# --------------------------- # - -# ** 7.1 PCA #### - -# we will run pca on the pre-scaled matrix from the pearson residual normalization -# if features are not specified it will automatically search for the hvf column in the feature metadata - -vizsubc <- runPCA(gobject = vizsubc, - spat_unit = 'aggregate', - expression_values = 'pearson', - scale_unit = F, center = F) - -screePlot(vizsubc, - ncp = 20, - spat_unit = 'aggregate') - -showGiottoDimRed(vizsubc) - -plotPCA(vizsubc, - spat_unit = 'aggregate', - dim_reduction_name = 'pca', - dim1_to_use = 1, - dim2_to_use = 2) - - -# ** 7.2 UMAP and TSN #### -vizsubc <- runUMAP(vizsubc, dimensions_to_use = 1:8, n_threads = 4, spat_unit = 'aggregate') -plotUMAP(gobject = vizsubc, spat_unit = 'aggregate') - -vizsubc <- runtSNE(vizsubc, dimensions_to_use = 1:8, spat_unit = 'aggregate') -plotTSNE(gobject = vizsubc, spat_unit = 'aggregate') - - -# 8. graph-based clustering #### -# ---------------------------- # -vizsubc <- createNearestNetwork(gobject = vizsubc, dimensions_to_use = 1:8, k = 10, - spat_unit = 'aggregate') -vizsubc <- doLeidenCluster(gobject = vizsubc, resolution = 0.05, n_iterations = 1000, - spat_unit = 'aggregate') -vizsubc <- doLouvainCluster(gobject = vizsubc, resolution = 5, - spat_unit = 'aggregate') - - -# visualize UMAP / TSNE cluster results -plotUMAP(gobject = vizsubc, - spat_unit = 'aggregate', - cell_color = 'leiden_clus', - show_NN_network = T, - point_size = 2.5) - -spatInSituPlotPoints(vizsubc, - show_polygon = TRUE, - spat_unit = 'aggregate', - polygon_feat_type = 'aggregate', - polygon_color = 'white', - polygon_line_size = 0.1, - polygon_fill = 'leiden_clus', - polygon_fill_as_factor = T, - coord_fix_ratio = T) - -plotTSNE(gobject = vizsubc, - spat_unit = 'aggregate', - cell_color = 'louvain_clus', - show_NN_network = T, - point_size = 2.5) - -spatInSituPlotPoints(vizsubc, - show_polygon = TRUE, - spat_unit = 'aggregate', - polygon_feat_type = 'aggregate', - polygon_color = 'white', - polygon_line_size = 0.1, - polygon_fill = 'louvain_clus', - polygon_fill_as_factor = T, - coord_fix_ratio = T) - -spatInSituPlotPoints(vizsubc, - spat_unit = 'aggregate', - show_image = T, - largeImage_name = 'dapi_z0', - feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), - feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), - point_size = 0.35, - show_polygon = TRUE, - polygon_feat_type = 'aggregate', - polygon_color = 'white', - polygon_line_size = 0.1, - polygon_fill = 'leiden_clus', - polygon_fill_as_factor = T, - coord_fix_ratio = TRUE) - - - - -# 9. spatial network #### -# --------------------- # -# defaults to delaunay -vizsubc = createSpatialNetwork(vizsubc, spat_unit = 'aggregate') -# kNN with k of 8 nearest -vizsubc = createSpatialNetwork(vizsubc, spat_unit = 'aggregate', method = 'kNN', k = 8) -# create spatial weight matrix -vizsubc = createSpatialWeightMatrix(vizsubc, - spat_unit = 'aggregate', - method = 'distance', - spatial_network_to_use = 'kNN_network', - return_gobject = TRUE) - -pDataDT(vizsubc, 'aggregate') -spatPlot(gobject = vizsubc, - spat_unit = 'aggregate', - show_network = T, - network_color = 'lightgray', - spatial_network_name = 'Delaunay_network', - point_size = 2.5, - cell_color = 'leiden_clus') - - -## 9.1 spatial genes #### -km_spatialfeats = binSpect(vizsubc, spat_unit = 'aggregate') - -spatFeatPlot2D_single(vizsubc, - spat_unit = 'aggregate', - expression_values = 'scaled', - feats = km_spatialfeats[1:4]$feats, - point_shape = 'border', - point_border_stroke = 0.1, - show_network = F, - network_color = 'lightgrey', - point_size = 2.5, - cow_n_col = 2) - -## 9.2 spatial co-expression #### -# here we use existing detectSpatialCorGenes function to calculate pairwise distances between genes -ext_spatial_genes = km_spatialfeats[1:200,]$feats -spat_cor_netw_DT = detectSpatialCorFeats(vizsubc, - spat_unit = 'aggregate', - method = 'network', - spatial_network_name = 'Delaunay_network', - subset_feats = ext_spatial_genes) - -# cluster and visualize spatial co-expression genes -spat_cor_netw_DT = clusterSpatialCorFeats(spat_cor_netw_DT, - name = 'spat_netw_clus', - k = 5) - -heatmSpatialCorFeats(vizsubc, - spatCorObject = spat_cor_netw_DT, - use_clus_name = 'spat_netw_clus', - heatmap_legend_param = list(title = NULL), - save_param = list(base_height = 6, - base_width = 8, - units = 'cm')) - -# create and visualize metafeatures -testweight = getBalancedSpatCoexpressionFeats(spat_cor_netw_DT, rank = 'weighted', maximum = 30) - -vizsubc = createMetafeats(vizsubc, - spat_unit = 'aggregate', - feat_clusters = testweight, - name = 'cluster_metagene') - -spatCellPlot(vizsubc, - spat_unit = 'aggregate', - spat_enr_names = 'cluster_metagene', - cell_annotation_values = as.character(c(1:6)), - gradient_style = 's', - point_size = 1.8, - save_param = list(base_width = 15)) - - - -## 9.3 spatial structure #### -cell_proximities = cellProximityEnrichment(gobject = vizsubc, - spat_unit = 'aggregate', - cluster_column = 'leiden_clus', - spatial_network_name = 'Delaunay_network', - adjust_method = 'fdr', - number_of_simulations = 2000) -## barplot -cellProximityBarplot(gobject = vizsubc, - CPscore = cell_proximities, - min_orig_ints = 5, min_sim_ints = 5) - -## heatmap -cellProximityHeatmap(gobject = vizsubc, - CPscore = cell_proximities, - order_cell_types = T, scale = T, - color_breaks = c(-1.5, 0, 1.5), - color_names = c('blue', 'white', 'red')) - -spatInSituPlotPoints( - vizsubc, - spat_unit = 'aggregate', - show_image = T, - largeImage_name = 'dapi_z0', - feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), - feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), - point_size = 0.75, - show_polygon = TRUE, - polygon_feat_type = 'aggregate', - polygon_color = 'white', - polygon_line_size = 0.1, - polygon_fill = 'leiden_clus', - polygon_fill_as_factor = T, - coord_fix_ratio = 1 -) - -showGiottoSpatialInfo(vizsubc) - - -spatInSituPlotDensity(vizsubc, - polygon_feat_type = 'aggregate', - feats = c("Htr1b", "Ackr1", "Epha7"), - alpha = 0.5, - polygon_color = 'white') - -spatInSituPlotHex(vizsubc, - polygon_feat_type = 'aggregate', - feats = c("Htr1b", "Ackr1", "Epha7")) - - - -# 10. save Giotto object #### -# ------------------------- # -format(object.size(vizsubc), units = 'Mb') - -# you need to use your local GiottoData repo -# giottodata_repo = '/Users/rubendries/Packages/R_Packages/GiottoData/inst/Mini_datasets/' -giottodata_repo = '/Users/rubendries/r_packages/GiottoData//inst/Mini_datasets/' - -saveGiotto(vizsubc, - foldername = 'VizgenObject', - #dir = paste0(system.file(package = 'GiottoData'),'/', 'Mini_datasets/Vizgen/'), - dir = paste0(giottodata_repo, '/', 'Vizgen/'), - overwrite = TRUE) - -pDataDT(vizsubc, spat_unit = 'aggregate') -pDataDT(vizsubc, spat_unit = 'aggregate') - - - -## some quick tests ## -gvizg = loadGiotto(path_to_folder = system.file('/Mini_datasets/Vizgen/VizgenObject/', - package = 'GiottoData')) - - -# subsetting -selected_ids = pDataDT(gvizg)$cell_ID[1:100] - -# important to specify which spatial_unit to use and which polygon information slots to update -mySubset <- subsetGiotto(gobject = gvizg, - cell_ids = selected_ids, - spat_unit = 'aggregate', - poly_info = c('aggregate')) - -pDataDT(mySubset, 'aggregate') -fDataDT(mySubset) - -spatInSituPlotPoints(mySubset, - spat_unit = 'aggregate', - show_image = T, - largeImage_name = 'dapi_z0', - feats = list('rna' = c("Htr1b", "Ackr1", "Epha7")), - feats_color_code = c("Htr1b" = 'green', 'Ackr1' = 'blue', 'Epha7' = 'red'), - point_size = 0.35, - show_polygon = TRUE, - polygon_feat_type = 'aggregate', - polygon_color = 'white', - polygon_line_size = 0.1, - polygon_fill = 'leiden_clus', - polygon_fill_as_factor = T, - coord_fix_ratio = TRUE) - - -spatPlot(gobject = mySubset, spat_unit = 'aggregate', show_network = T, - network_color = 'lightgray', spatial_network_name = 'Delaunay_network', - point_size = 2.5, cell_color = 'leiden_clus') From 8f5dd12a3ef1ffd4e8b6b4214e870f25db9afe10 Mon Sep 17 00:00:00 2001 From: jiajic <72078254+jiajic@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:08:40 -0500 Subject: [PATCH 6/6] run document --- man/findScranMarkers.Rd | 2 +- man/reexports.Rd | 2 +- man/runPCAprojection.Rd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/findScranMarkers.Rd b/man/findScranMarkers.Rd index 84f39d7b7..b35d9b18c 100644 --- a/man/findScranMarkers.Rd +++ b/man/findScranMarkers.Rd @@ -15,7 +15,7 @@ findScranMarkers( group_1_name = NULL, group_2 = NULL, group_2_name = NULL, - verbose = FALSE, + verbose = TRUE, ... ) } diff --git a/man/reexports.Rd b/man/reexports.Rd index 01e774cb3..6c9417f73 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -206,7 +206,7 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} + \item{GiottoClass}{\code{\link[GiottoClass]{addCellMetadata}}, \code{\link[GiottoClass]{addGiottoImage}}, \code{\link[GiottoClass]{addGiottoImageMG}}, \code{\link[GiottoClass]{addGiottoLargeImage}}, \code{\link[GiottoClass]{addGiottoPoints}}, \code{\link[GiottoClass:addGiottoPoints]{addGiottoPoints3D}}, \code{\link[GiottoClass]{addGiottoPolygons}}, \code{\link[GiottoClass]{addSpatialCentroidLocations}}, \code{\link[GiottoClass]{addSpatialCentroidLocationsLayer}}, \code{\link[GiottoClass]{aggregateStacks}}, \code{\link[GiottoClass]{aggregateStacksExpression}}, \code{\link[GiottoClass]{aggregateStacksLocations}}, \code{\link[GiottoClass]{aggregateStacksPolygonOverlaps}}, \code{\link[GiottoClass]{aggregateStacksPolygons}}, \code{\link[GiottoClass]{aggregateStacksPolygonsOLD}}, \code{\link[GiottoClass]{anndataToGiotto}}, \code{\link[GiottoClass]{annotateGiotto}}, \code{\link[GiottoClass]{annotateSpatialGrid}}, \code{\link[GiottoClass]{annotateSpatialNetwork}}, \code{\link[GiottoClass]{calculateMetaTable}}, \code{\link[GiottoClass]{calculateMetaTableCells}}, \code{\link[GiottoClass]{calculateOverlapParallel}}, \code{\link[GiottoClass]{calculateOverlapPolygonImages}}, \code{\link[GiottoClass]{calculateOverlapRaster}}, \code{\link[GiottoClass]{calculateOverlapSerial}}, \code{\link[GiottoClass]{changeGiottoInstructions}}, \code{\link[GiottoClass]{changeImageBg}}, \code{\link[GiottoClass]{circleVertices}}, \code{\link[GiottoClass]{combineCellData}}, \code{\link[GiottoClass]{combineFeatureData}}, \code{\link[GiottoClass]{combineFeatureOverlapData}}, \code{\link[GiottoClass]{combineMetadata}}, \code{\link[GiottoClass]{combineSpatialCellFeatureInfo}}, \code{\link[GiottoClass]{combineSpatialCellMetadataInfo}}, \code{\link[GiottoClass]{convertGiottoLargeImageToMG}}, \code{\link[GiottoClass]{createCellMetaObj}}, \code{\link[GiottoClass]{createDimObj}}, \code{\link[GiottoClass]{createExprObj}}, \code{\link[GiottoClass]{createFeatMetaObj}}, \code{\link[GiottoClass]{createGiottoImage}}, \code{\link[GiottoClass]{createGiottoInstructions}}, \code{\link[GiottoClass]{createGiottoLargeImage}}, \code{\link[GiottoClass]{createGiottoLargeImageList}}, \code{\link[GiottoClass]{createGiottoObject}}, \code{\link[GiottoClass]{createGiottoObjectSubcellular}}, \code{\link[GiottoClass]{createGiottoPoints}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromDfr}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromGeoJSON}}, \code{\link[GiottoClass:createGiottoPolygon]{createGiottoPolygonsFromMask}}, \code{\link[GiottoClass]{createMetafeats}}, \code{\link[GiottoClass]{createNearestNetObj}}, \code{\link[GiottoClass]{createSpatEnrObj}}, \code{\link[GiottoClass]{createSpatialDefaultGrid}}, \code{\link[GiottoClass]{createSpatialDelaunayNetwork}}, \code{\link[GiottoClass]{createSpatialFeaturesKNNnetwork}}, \code{\link[GiottoClass]{createSpatialGrid}}, \code{\link[GiottoClass]{createSpatialKNNnetwork}}, \code{\link[GiottoClass]{createSpatialNetwork}}, \code{\link[GiottoClass]{createSpatialWeightMatrix}}, \code{\link[GiottoClass]{createSpatLocsObj}}, \code{\link[GiottoClass]{createSpatNetObj}}, \code{\link[GiottoClass]{cropGiottoLargeImage}}, \code{\link[GiottoClass]{distGiottoImage}}, \code{\link[GiottoClass]{estimateImageBg}}, \code{\link[GiottoClass]{fDataDT}}, \code{\link[GiottoClass:featType-generic]{featType}}, \code{\link[GiottoClass:featureNetwork-class]{featureNetwork}}, \code{\link[GiottoClass]{gefToGiotto}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_dimReduction}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_feature_info}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_giottoImage}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_multiomics}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_NearestNetwork}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_polygon_info}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_enrichment}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatial_locations}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialGrid}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{get_spatialNetwork}}, \code{\link[GiottoClass]{getCellMetadata}}, \code{\link[GiottoClass]{getDimReduction}}, \code{\link[GiottoClass]{getExpression}}, \code{\link[GiottoClass]{getFeatureInfo}}, \code{\link[GiottoClass]{getFeatureMetadata}}, \code{\link[GiottoClass]{getGiottoImage}}, \code{\link[GiottoClass]{getMultiomics}}, \code{\link[GiottoClass]{getNearestNetwork}}, \code{\link[GiottoClass]{getPolygonInfo}}, \code{\link[GiottoClass]{getRainbowColors}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialEnrichment}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialGrid}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialLocations}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass]{getSpatialNetwork}}, \code{\link[GiottoClass:giotto-class]{giotto}}, \code{\link[GiottoClass:giottoImage-class]{giottoImage}}, \code{\link[GiottoClass:giottoLargeImage-class]{giottoLargeImage}}, \code{\link[GiottoClass]{giottoMasterToSuite}}, \code{\link[GiottoClass:giottoPoints-class]{giottoPoints}}, \code{\link[GiottoClass:giottoPolygon-class]{giottoPolygon}}, \code{\link[GiottoClass]{giottoToAnnData}}, \code{\link[GiottoClass]{giottoToSeurat}}, \code{\link[GiottoClass]{giottoToSpatialExperiment}}, \code{\link[GiottoClass]{hexVertices}}, \code{\link[GiottoClass]{joinGiottoObjects}}, \code{\link[GiottoClass]{loadGiotto}}, \code{\link[GiottoClass]{makePseudoVisium}}, \code{\link[GiottoClass]{objHistory}}, \code{\link[GiottoClass:objName-generic]{objName}}, \code{\link[GiottoClass]{overlapImagesToMatrix}}, \code{\link[GiottoClass]{overlapToMatrix}}, \code{\link[GiottoClass]{overlapToMatrixMultiPoly}}, \code{\link[GiottoClass]{pDataDT}}, \code{\link[GiottoClass]{plotGiottoImage}}, \code{\link[GiottoClass]{polyStamp}}, \code{\link[GiottoClass:prov-generic]{prov}}, \code{\link[GiottoClass:read_cell_metadata]{readCellMetadata}}, \code{\link[GiottoClass]{readDimReducData}}, \code{\link[GiottoClass]{readExprData}}, \code{\link[GiottoClass]{readExprMatrix}}, \code{\link[GiottoClass]{readFeatData}}, \code{\link[GiottoClass:read_feature_metadata]{readFeatMetadata}}, \code{\link[GiottoClass]{readGiottoInstructions}}, \code{\link[GiottoClass]{readNearestNetData}}, \code{\link[GiottoClass]{readPolygonData}}, \code{\link[GiottoClass]{readSpatEnrichData}}, \code{\link[GiottoClass]{readSpatLocsData}}, \code{\link[GiottoClass]{readSpatNetData}}, \code{\link[GiottoClass]{reconnectGiottoImage}}, \code{\link[GiottoClass]{rectVertices}}, \code{\link[GiottoClass]{removeCellAnnotation}}, \code{\link[GiottoClass]{removeFeatAnnotation}}, \code{\link[GiottoClass]{replaceGiottoInstructions}}, \code{\link[GiottoClass]{rescalePolygons}}, \code{\link[GiottoClass]{saveGiotto}}, \code{\link[GiottoClass]{set_dimReduction}}, \code{\link[GiottoClass]{set_expression_values}}, \code{\link[GiottoClass]{set_feature_info}}, \code{\link[GiottoClass]{set_giottoImage}}, \code{\link[GiottoClass]{set_multiomics}}, \code{\link[GiottoClass]{set_NearestNetwork}}, \code{\link[GiottoClass]{set_polygon_info}}, \code{\link[GiottoClass]{set_spatial_enrichment}}, \code{\link[GiottoClass]{set_spatial_locations}}, \code{\link[GiottoClass]{set_spatialGrid}}, \code{\link[GiottoClass]{set_spatialNetwork}}, \code{\link[GiottoClass]{setDimReduction}}, \code{\link[GiottoClass]{setExpression}}, \code{\link[GiottoClass]{setFeatureInfo}}, \code{\link[GiottoClass]{setGiottoImage}}, \code{\link[GiottoClass]{setMultiomics}}, \code{\link[GiottoClass]{setNearestNetwork}}, \code{\link[GiottoClass]{setPolygonInfo}}, \code{\link[GiottoClass]{setSpatialEnrichment}}, \code{\link[GiottoClass]{setSpatialGrid}}, \code{\link[GiottoClass]{setSpatialLocations}}, \code{\link[GiottoClass]{setSpatialNetwork}}, \code{\link[GiottoClass]{seuratToGiotto}}, \code{\link[GiottoClass]{showGiottoCellMetadata}}, \code{\link[GiottoClass]{showGiottoDimRed}}, \code{\link[GiottoClass]{showGiottoExpression}}, \code{\link[GiottoClass]{showGiottoFeatInfo}}, \code{\link[GiottoClass]{showGiottoFeatMetadata}}, \code{\link[GiottoClass]{showGiottoImageNames}}, \code{\link[GiottoClass]{showGiottoInstructions}}, \code{\link[GiottoClass]{showGiottoNearestNetworks}}, \code{\link[GiottoClass]{showGiottoSpatEnrichments}}, \code{\link[GiottoClass]{showGiottoSpatGrids}}, \code{\link[GiottoClass]{showGiottoSpatialInfo}}, \code{\link[GiottoClass]{showGiottoSpatLocs}}, \code{\link[GiottoClass]{showGiottoSpatNetworks}}, \code{\link[GiottoClass]{showGrids}}, \code{\link[GiottoClass]{showNetworks}}, \code{\link[GiottoClass]{showProcessingSteps}}} \item{GiottoUtils}{\code{\link[GiottoUtils:pipe]{\%>\%}}} diff --git a/man/runPCAprojection.Rd b/man/runPCAprojection.Rd index bdf95f934..ae2546d97 100644 --- a/man/runPCAprojection.Rd +++ b/man/runPCAprojection.Rd @@ -37,7 +37,7 @@ runPCAprojection( \item{reduction}{cells or genes} -\item{random_subset}{random subset to perform PCA on} +\item{random_subset}{numeric. random subset to perform PCA on} \item{name}{arbitrary name for PCA run}