+
ent = SpatialFeatures::EntropyMatrix(me, c("subsector", "subconcentric", "supersector", "superconcentric"), nCores = 1)
lapply(ent, head, n = 4)
#> $subsector
@@ -349,7 +370,7 @@ Create SummarizedExperiment
This function EntropySummarizedExperiment()
Convert the
entropy matrix into a SummarizedExperiment
object.
-
+
se = SpatialFeatures::EntropySummarizedExperiment(ent, me)
se
#> class: SummarizedExperiment
@@ -362,7 +383,7 @@ Create SummarizedExperiment#> sample2.65071
#> colData names(5): Cell Sample_id x_central y_central boundaries
If you also want the gene counts, you can include the parameter
-
+
se = EntropySummarizedExperiment(ent, me, includeCounts = TRUE)
se
#> class: SummarizedExperiment
@@ -381,7 +402,7 @@ Inspect the Spa
Check the structure and content of the SummarizedExperiment
object:
-
+
se
#> class: SummarizedExperiment
#> dim: 178 14
@@ -428,7 +449,7 @@ Inspect the Spa
Finish
-
+
sessionInfo()
#> R version 4.4.1 (2024-06-14)
#> Platform: x86_64-pc-linux-gnu
@@ -452,7 +473,7 @@ Finish
#> [8] methods base
#>
#> other attached packages:
-#> [1] ggplot2_3.5.1 SpatialFeatures_0.0.1
+#> [1] ggplot2_3.5.1 SpatialFeatures_0.0.2
#> [3] purrr_1.0.2 dplyr_1.1.4
#> [5] SummarizedExperiment_1.34.0 Biobase_2.64.0
#> [7] GenomicRanges_1.56.1 GenomeInfoDb_1.40.1
diff --git a/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-1.png b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-1.png
new file mode 100644
index 0000000..5d0504f
Binary files /dev/null and b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-1.png differ
diff --git a/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-2.png b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-2.png
new file mode 100644
index 0000000..22f5530
Binary files /dev/null and b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-2.png differ
diff --git a/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-3.png b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-3.png
new file mode 100644
index 0000000..5d5a987
Binary files /dev/null and b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-3.png differ
diff --git a/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-4.png b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-4.png
new file mode 100644
index 0000000..ab2d465
Binary files /dev/null and b/articles/SpatialFeatures_files/figure-html/unnamed-chunk-7-4.png differ
diff --git a/articles/index.html b/articles/index.html
index 3609add..70ee32f 100644
--- a/articles/index.html
+++ b/articles/index.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/index.html b/index.html
index 43f8f91..ce2a4db 100644
--- a/index.html
+++ b/index.html
@@ -22,7 +22,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/pkgdown.yml b/pkgdown.yml
index 8402e0a..e2d649e 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.1.0
pkgdown_sha: ~
articles:
SpatialFeatures: SpatialFeatures.html
-last_built: 2024-08-02T06:55Z
+last_built: 2024-08-05T04:32Z
urls:
reference: https://sydneybiox.github.io/SpatialFeatures/reference
article: https://sydneybiox.github.io/SpatialFeatures/articles
diff --git a/reference/CountsMatrix.html b/reference/CountsMatrix.html
index 33ef665..3332743 100644
--- a/reference/CountsMatrix.html
+++ b/reference/CountsMatrix.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/EntropyMatrix.html b/reference/EntropyMatrix.html
index 527432b..45703ad 100644
--- a/reference/EntropyMatrix.html
+++ b/reference/EntropyMatrix.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/EntropySummarizedExperiment.html b/reference/EntropySummarizedExperiment.html
index 10e46dd..b1240b6 100644
--- a/reference/EntropySummarizedExperiment.html
+++ b/reference/EntropySummarizedExperiment.html
@@ -9,7 +9,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/GenerateFeatureData.html b/reference/GenerateFeatureData.html
index d428bca..e703ee9 100644
--- a/reference/GenerateFeatureData.html
+++ b/reference/GenerateFeatureData.html
@@ -31,7 +31,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/annuli_counts.html b/reference/annuli_counts.html
index 6dda731..cde95c9 100644
--- a/reference/annuli_counts.html
+++ b/reference/annuli_counts.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/calculate_centroids.html b/reference/calculate_centroids.html
index 8b8c6f2..fad63cd 100644
--- a/reference/calculate_centroids.html
+++ b/reference/calculate_centroids.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/calculate_entropy.html b/reference/calculate_entropy.html
index 11bd944..5df3776 100644
--- a/reference/calculate_entropy.html
+++ b/reference/calculate_entropy.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/compute_cell_entropy.html b/reference/compute_cell_entropy.html
index ed65bbc..43bc5ad 100644
--- a/reference/compute_cell_entropy.html
+++ b/reference/compute_cell_entropy.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/countsprop.html b/reference/countsprop.html
index c60ac57..33b821d 100644
--- a/reference/countsprop.html
+++ b/reference/countsprop.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/create_scaled_df_sub.html b/reference/create_scaled_df_sub.html
index e3a8b67..ff7044c 100644
--- a/reference/create_scaled_df_sub.html
+++ b/reference/create_scaled_df_sub.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/create_scaled_df_super.html b/reference/create_scaled_df_super.html
index 686bbe7..655a2e6 100644
--- a/reference/create_scaled_df_super.html
+++ b/reference/create_scaled_df_super.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/create_sector_df.html b/reference/create_sector_df.html
index 37d1759..3796062 100644
--- a/reference/create_sector_df.html
+++ b/reference/create_sector_df.html
@@ -9,7 +9,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/create_sectors.html b/reference/create_sectors.html
index c140a0e..612c297 100644
--- a/reference/create_sectors.html
+++ b/reference/create_sectors.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/extract_boundaries.html b/reference/extract_boundaries.html
index 700371c..64e6147 100644
--- a/reference/extract_boundaries.html
+++ b/reference/extract_boundaries.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/extract_boundaries_and_centroids.html b/reference/extract_boundaries_and_centroids.html
index d169da3..a5849eb 100644
--- a/reference/extract_boundaries_and_centroids.html
+++ b/reference/extract_boundaries_and_centroids.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/extract_cell_segments.html b/reference/extract_cell_segments.html
index 0381976..6808ca7 100644
--- a/reference/extract_cell_segments.html
+++ b/reference/extract_cell_segments.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/generate_scale_factors_all.html b/reference/generate_scale_factors_all.html
index 6dcc126..9c47fce 100644
--- a/reference/generate_scale_factors_all.html
+++ b/reference/generate_scale_factors_all.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/generate_scale_factors_all_outside.html b/reference/generate_scale_factors_all_outside.html
index 76224e9..ccb72ef 100644
--- a/reference/generate_scale_factors_all_outside.html
+++ b/reference/generate_scale_factors_all_outside.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/get_cells.html b/reference/get_cells.html
index 962a5c0..ad6d054 100644
--- a/reference/get_cells.html
+++ b/reference/get_cells.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/index.html b/reference/index.html
index 3f8f274..9926a6b 100644
--- a/reference/index.html
+++ b/reference/index.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/loadBoundaries.html b/reference/loadBoundaries.html
index 927de25..456335b 100644
--- a/reference/loadBoundaries.html
+++ b/reference/loadBoundaries.html
@@ -25,7 +25,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/make_assay_data.html b/reference/make_assay_data.html
index c59b99f..eb6a078 100644
--- a/reference/make_assay_data.html
+++ b/reference/make_assay_data.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/matrix_entropy.html b/reference/matrix_entropy.html
index e98acf9..5e2125f 100644
--- a/reference/matrix_entropy.html
+++ b/reference/matrix_entropy.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/me.html b/reference/me.html
index e96f1ad..b65623d 100644
--- a/reference/me.html
+++ b/reference/me.html
@@ -7,7 +7,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/modify_area_id.html b/reference/modify_area_id.html
index 14f6b09..9a0e008 100644
--- a/reference/modify_area_id.html
+++ b/reference/modify_area_id.html
@@ -9,7 +9,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/reference/spatialFeatures.html b/reference/spatialFeatures.html
index 34ebc6d..2a4de40 100644
--- a/reference/spatialFeatures.html
+++ b/reference/spatialFeatures.html
@@ -29,7 +29,7 @@
SpatialFeatures
- 0.0.1
+ 0.0.2
diff --git a/search.json b/search.json
index 245bdce..6b9d37b 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"spatialfeatures","dir":"Articles","previous_headings":"","what":"SpatialFeatures","title":"An introduction to the SpatialFeatures Package","text":"R package SpatialFeatures contains functions extract features molecule-resolved spatial transcriptomics data using objects MoleculeExperiment class.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"load-required-libraries","dir":"Articles","previous_headings":"SpatialFeatures","what":"Load Required Libraries","title":"An introduction to the SpatialFeatures Package","text":"","code":"library(SpatialFeatures) library(MoleculeExperiment) library(ggplot2) library(SummarizedExperiment) library(dplyr)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-example-dataset","dir":"Articles","previous_headings":"SpatialFeatures","what":"Create Example Dataset","title":"An introduction to the SpatialFeatures Package","text":"Load example MoleculeExperiment object Xenium data:","code":"repoDir <- system.file(\"extdata\", package = \"MoleculeExperiment\") repoDir <- paste0(repoDir, \"/xenium_V1_FF_Mouse_Brain\") me <- readXenium(repoDir, keepCols = \"essential\") me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (1): cell #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"quick-start","dir":"Articles","previous_headings":"SpatialFeatures","what":"Quick start","title":"An introduction to the SpatialFeatures Package","text":"spatialFeatures function performs three key steps","code":"se = spatialFeatures(me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":[]},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"generate-new-boundaries-based-on-subcellular-and-supercellular-features","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Generate new boundaries based on subcellular and supercellular features","title":"An introduction to the SpatialFeatures Package","text":"function loadBoundaries() processes given data () returns feature data based multiple assay types, including: - Sub-Sector - Sub-Concentric - Super-Sector - Super-Concentric","code":"me <- SpatialFeatures::loadBoundaries(me) me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (5): cell subsector subconcentric supersector #> superconcentric #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071 #> - subsector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (60): 67500_01 67500_02 ... 67527_11 67527_12 #> -- sample2: #> ---- segments (108): 65043_01 65043_02 ... 65071_11 65071_12 #> - subconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (30): 67500_01 67500_02 ... 67527_05 67527_06 #> -- sample2: #> ---- segments (54): 65043_01 65043_02 ... 65071_05 65071_06 #> - supersector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (55): 67500_01 67500_02 ... 67527_10 67527_11 #> -- sample2: #> ---- segments (99): 65043_01 65043_02 ... 65071_10 65071_11 #> - superconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (35): 67500_01 67500_02 ... 67527_06 67527_07 #> -- sample2: #> ---- segments (63): 65043_01 65043_02 ... 65071_06 65071_07"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"draw-the-feature-boundary-plots","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Draw the Feature Boundary Plots","title":"An introduction to the SpatialFeatures Package","text":"Visualize spatial molecule cell boundary map SpatialFeature boundaries.","code":"ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"subsector\", fill = NA, colour = \"red\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"subconcentric\", fill = NA, colour = \"red\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"supersector\", fill = NA, colour = \"blue\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"superconcentric\", fill = NA, colour = \"blue\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455))"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-entropy-matrix","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Create Entropy Matrix","title":"An introduction to the SpatialFeatures Package","text":"function EntropyMatrix() computes entropy counts matrix MoleculeExperiment object based given assay type.","code":"ent = SpatialFeatures::EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) lapply(ent, head, n = 4) #> $subsector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0.6931472 #> Acsbg1 0.6931472 0.6931472 0.6931472 0.0000000 #> Adamts2 0.0000000 0.0000000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0.0000000 #> Acsbg1 0 0 0 0.6931472 #> Adamts2 0 0 0 0.0000000 #> Adamtsl1 0 0 0 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.5498260 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0.0000000 #> Acsbg1 0 0.6931472 #> Adamts2 0 0.0000000 #> Adamtsl1 0 0.0000000 #> #> $subconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0 #> Acsbg1 0.6931472 0.0000000 0.6931472 0 #> Adamts2 0.0000000 0.0000000 0.0000000 0 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0 #> Acsbg1 0 0 0 0 #> Adamts2 0 0 0 0 #> Adamtsl1 0 0 0 0 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.2770343 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0 #> Acsbg1 0 0 #> Adamts2 0 0 #> Adamtsl1 0 0 #> #> $supersector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0 1.332179 0.6931472 0.6931472 #> Acsbg1 0 0.000000 0.6931472 0.6931472 #> Adamts2 0 0.000000 0.0000000 0.0000000 #> Adamtsl1 0 0.000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0.5623351 1.039721 0.5982696 #> Acsbg1 0 0.0000000 0.000000 0.9502705 #> Adamts2 0 0.0000000 0.000000 0.0000000 #> Adamtsl1 0 0.0000000 0.000000 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.000000 0.6931472 0 0.0000000 #> Acsbg1 1.559581 1.0114043 0 0.6931472 #> Adamts2 0.000000 0.0000000 0 0.0000000 #> Adamtsl1 0.000000 0.0000000 0 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.0000000 0.0000000 #> Acsbg1 0.5623351 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #> #> $superconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 1.5607104 1.05492 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.00000 0.6931472 0.6931472 #> Adamts2 0.0000000 0.00000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.00000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0.0000000 1.039721 1.386294 1.549826 #> Acsbg1 0.6931472 0.000000 0.000000 1.054920 #> Adamts2 0.0000000 0.000000 0.000000 0.000000 #> Adamtsl1 0.0000000 0.000000 0.000000 0.000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.6931472 0.6931472 1.386294 0.0000000 #> Acsbg1 1.3208883 1.3296613 0.000000 0.6931472 #> Adamts2 0.0000000 0.0000000 0.000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.000000 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-summarizedexperiment-object","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Create SummarizedExperiment Object","title":"An introduction to the SpatialFeatures Package","text":"function EntropySummarizedExperiment() Convert entropy matrix SummarizedExperiment object. also want gene counts, can include parameter","code":"se = SpatialFeatures::EntropySummarizedExperiment(ent, me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries se = EntropySummarizedExperiment(ent, me, includeCounts = TRUE) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(5): subsector subconcentric supersector superconcentric #> genecount #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"inspect-the-spatialfeatures-summarizedexperiment-object","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Inspect the SpatialFeatures SummarizedExperiment Object","title":"An introduction to the SpatialFeatures Package","text":"Check structure content SummarizedExperiment object:","code":"se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(5): subsector subconcentric supersector superconcentric #> genecount #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries colData(se) #> DataFrame with 14 rows and 5 columns #> Cell Sample_id x_central y_central #> #> sample1.67500 sample1.67500 sample1 4896.19 6415.14 #> sample1.67512 sample1.67512 sample1 4909.74 6411.80 #> sample1.67515 sample1.67515 sample1 4912.42 6402.93 #> sample1.67521 sample1.67521 sample1 4916.01 6415.75 #> sample1.67527 sample1.67527 sample1 4923.68 6414.74 #> ... ... ... ... ... #> sample2.65063 sample2.65063 sample2 4928.03 6415.25 #> sample2.65064 sample2.65064 sample2 4896.37 6406.56 #> sample2.65067 sample2.65067 sample2 4923.71 6406.08 #> sample2.65070 sample2.65070 sample2 4902.14 6395.17 #> sample2.65071 sample2.65071 sample2 4920.63 6398.99 #> boundaries #> #> sample1.67500 4896.85:6413.46,4895.15:6413.89,4894.30:6417.71 #> sample1.67512 4901.95:6417.07,4901.52:6418.56,4900.89:6419.41 #> sample1.67515 4916.40:6412.61,4912.15:6420.05,4910.45:6430.89 #> sample1.67521 4911.51:6397.95,4907.48:6400.71,4904.07:6407.30 #> sample1.67527 4929.57:6408.36,4924.69:6409.85,4921.29:6409.85 #> ... ... #> sample2.65063 4904.71:6399.65,4898.76:6401.35,4894.30:6407.94 #> sample2.65064 4905.77:6404.11,4906.20:6407.73,4907.05:6412.19 #> sample2.65067 4908.96:6395.61,4904.93:6399.44,4905.56:6403.26 #> sample2.65070 4919.59:6408.36,4915.98:6411.34,4915.76:6411.98 #> sample2.65071 4922.35:6404.54,4919.80:6407.94,4920.23:6413.46 rowData(se) #> DataFrame with 178 rows and 0 columns"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"finish","dir":"Articles","previous_headings":"","what":"Finish","title":"An introduction to the SpatialFeatures Package","text":"","code":"sessionInfo() #> R version 4.4.1 (2024-06-14) #> Platform: x86_64-pc-linux-gnu #> Running under: Ubuntu 22.04.4 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] parallel stats4 stats graphics grDevices utils datasets #> [8] methods base #> #> other attached packages: #> [1] ggplot2_3.5.1 SpatialFeatures_0.0.1 #> [3] purrr_1.0.2 dplyr_1.1.4 #> [5] SummarizedExperiment_1.34.0 Biobase_2.64.0 #> [7] GenomicRanges_1.56.1 GenomeInfoDb_1.40.1 #> [9] IRanges_2.38.1 S4Vectors_0.42.1 #> [11] BiocGenerics_0.50.0 MatrixGenerics_1.16.0 #> [13] matrixStats_1.3.0 MoleculeExperiment_1.4.1 #> [15] BiocStyle_2.32.1 #> #> loaded via a namespace (and not attached): #> [1] tidyselect_1.2.1 EBImage_4.46.0 #> [3] farver_2.1.2 bitops_1.0-8 #> [5] fastmap_1.2.0 SingleCellExperiment_1.26.0 #> [7] RCurl_1.98-1.16 digest_0.6.36 #> [9] lifecycle_1.0.4 terra_1.7-78 #> [11] magrittr_2.0.3 compiler_4.4.1 #> [13] rlang_1.1.4 sass_0.4.9 #> [15] tools_4.4.1 utf8_1.2.4 #> [17] yaml_2.3.10 data.table_1.15.4 #> [19] knitr_1.48 labeling_0.4.3 #> [21] S4Arrays_1.4.1 htmlwidgets_1.6.4 #> [23] bit_4.0.5 DelayedArray_0.30.1 #> [25] abind_1.4-5 BiocParallel_1.38.0 #> [27] withr_3.0.1 desc_1.4.3 #> [29] grid_4.4.1 fansi_1.0.6 #> [31] colorspace_2.1-1 scales_1.3.0 #> [33] cli_3.6.3 rmarkdown_2.27 #> [35] crayon_1.5.3 ragg_1.3.2 #> [37] generics_0.1.3 httr_1.4.7 #> [39] rjson_0.2.21 cachem_1.1.0 #> [41] zlibbioc_1.50.0 BiocManager_1.30.23 #> [43] XVector_0.44.0 tiff_0.1-12 #> [45] vctrs_0.6.5 Matrix_1.7-0 #> [47] jsonlite_1.8.8 bookdown_0.40 #> [49] fftwtools_0.9-11 bit64_4.0.5 #> [51] systemfonts_1.1.0 jpeg_0.1-10 #> [53] magick_2.8.4 locfit_1.5-9.10 #> [55] jquerylib_0.1.4 glue_1.7.0 #> [57] pkgdown_2.1.0 codetools_0.2-20 #> [59] gtable_0.3.5 UCSC.utils_1.0.0 #> [61] munsell_0.5.1 tibble_3.2.1 #> [63] pillar_1.9.0 htmltools_0.5.8.1 #> [65] GenomeInfoDbData_1.2.12 R6_2.5.1 #> [67] textshaping_0.4.0 evaluate_0.24.0 #> [69] lattice_0.22-6 highr_0.11 #> [71] png_0.1-8 SpatialExperiment_1.14.0 #> [73] bslib_0.8.0 Rcpp_1.0.13 #> [75] SparseArray_1.4.8 xfun_0.46 #> [77] fs_1.6.4 pkgconfig_2.0.3"},{"path":"https://sydneybiox.github.io/SpatialFeatures/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Shila Ghazanfar. Author, maintainer, contributor. Guan Gui. Contributor.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ghazanfar S (2024). SpatialFeatures: Entropy-based subcellular supercellular features molecule-resolved spatial omics datasets. R package version 0.0.1, https://sydneybiox.github.io/SpatialFeatures/.","code":"@Manual{, title = {SpatialFeatures: Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets}, author = {Shila Ghazanfar}, year = {2024}, note = {R package version 0.0.1}, url = {https://sydneybiox.github.io/SpatialFeatures/}, }"},{"path":"https://sydneybiox.github.io/SpatialFeatures/index.html","id":"spatialfeatures","dir":"","previous_headings":"","what":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","title":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","text":"R package incorprate features molecule-resolved spatial transcriptomics data. usage instructions package can found vignettes folder.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","text":"can install SpatialFeatures GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"SydneyBioX/SpatialFeatures\")"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"function retrieves counts matrix Molecule Experiment object based given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"","code":"CountsMatrix(me, assayName, nCores = 1, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"Molecule Experiment object. assayName character string indicating assay type. Supported values include \"sub-sector\", \"sub-concentric\", \"sub-combo\", \"super-concentric\", \"super-combo\". nCores Number cores parallel processing (default 1) ... arguments passing MoleculeExperiment::countMolecules","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"counts matrix corresponding specified assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"","code":"if (FALSE) { # \\dontrun{ # Assuming `data_obj` is your Molecule Experiment object cm = CountsMatrix(data_obj, assayName = \"sub-sector\") } # }"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"function computes entropy counts matrix Molecule Experiment object based given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"","code":"EntropyMatrix(me, featureTypes, nCores = 1, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"Molecule Experiment object. featureTypes character string specifying feature type. Supported values include \"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\". nCores Number cores ... arguments passing CountsMatrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"matrix representing entropy values corresponding given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"","code":"data(example_me) me <- loadBoundaries(me) ent <- EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) lapply(ent, head, n = 4) #> $subsector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0.6931472 #> Acsbg1 0.6931472 0.6931472 0.6931472 0.0000000 #> Adamts2 0.0000000 0.0000000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0.0000000 #> Acsbg1 0 0 0 0.6931472 #> Adamts2 0 0 0 0.0000000 #> Adamtsl1 0 0 0 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.5498260 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0.0000000 #> Acsbg1 0 0.6931472 #> Adamts2 0 0.0000000 #> Adamtsl1 0 0.0000000 #> #> $subconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0 #> Acsbg1 0.6931472 0.0000000 0.6931472 0 #> Adamts2 0.0000000 0.0000000 0.0000000 0 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0 #> Acsbg1 0 0 0 0 #> Adamts2 0 0 0 0 #> Adamtsl1 0 0 0 0 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.2770343 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0 #> Acsbg1 0 0 #> Adamts2 0 0 #> Adamtsl1 0 0 #> #> $supersector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0 1.332179 0.6931472 0.6931472 #> Acsbg1 0 0.000000 0.6931472 0.6931472 #> Adamts2 0 0.000000 0.0000000 0.0000000 #> Adamtsl1 0 0.000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0.5623351 1.039721 0.5982696 #> Acsbg1 0 0.0000000 0.000000 0.9502705 #> Adamts2 0 0.0000000 0.000000 0.0000000 #> Adamtsl1 0 0.0000000 0.000000 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.000000 0.6931472 0 0.0000000 #> Acsbg1 1.559581 1.0114043 0 0.6931472 #> Adamts2 0.000000 0.0000000 0 0.0000000 #> Adamtsl1 0.000000 0.0000000 0 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.0000000 0.0000000 #> Acsbg1 0.5623351 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #> #> $superconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 1.5607104 1.05492 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.00000 0.6931472 0.6931472 #> Adamts2 0.0000000 0.00000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.00000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0.0000000 1.039721 1.386294 1.549826 #> Acsbg1 0.6931472 0.000000 0.000000 1.054920 #> Adamts2 0.0000000 0.000000 0.000000 0.000000 #> Adamtsl1 0.0000000 0.000000 0.000000 0.000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.6931472 0.6931472 1.386294 0.0000000 #> Acsbg1 1.3208883 1.3296613 0.000000 0.6931472 #> Adamts2 0.0000000 0.0000000 0.000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.000000 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #>"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"function takes list data frames Molecule Experiment object constructs SummarizedExperiment object specified data structure.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"","code":"EntropySummarizedExperiment( df_list, me, includeCounts = FALSE, concatenateFeatures = FALSE, nCores = 1 )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"df_list list data frames, containing assay data. Molecule Experiment object. includeCounts logical (default FALSE) whether include gene counts features concatenateFeatures logical whether concatenate features single assay (default FALSE). FALSE output SE object multiple assays nCores Number cores (default 1)","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"SummarizedExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"","code":"data(example_me) me <- loadBoundaries(me) ent <- EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) se <- EntropySummarizedExperiment(ent, me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"comprehensive function processes given data () returns feature data based multiple assay types. supported assays encapsulated within function include: Sub-sector polygons Sub-concentric polygons Sub-combo polygons Super-concentric polygons Super-combo polygons assays represent various spatial subdivisions transformations, addressing unique feature characteristics. results assay combined returned list dataframes.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"","code":"GenerateFeatureData( me, featureTypes = c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), k = 5 )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"input data object. object contains spatial information, typically regarding segments regions interest. featureTypes Character vector containing feature types calculate. k numeric value indicating scaling factor concentric polygons. Defaults 5.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"list containing dataframes assay type: subsector: Feature data sub-sector polygons. subconcentric: Feature data sub-concentric polygons. supersector: Feature data super-sector polygons. superconcentric: Feature data super-concentric polygons.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"Convert cumulative counts concentric polygons annuli polygon counts","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"","code":"annuli_counts(mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"mat matrix cumulative counts.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"matrix annuli polygon counts.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate centroids from boundaries — calculate_centroids","title":"Calculate centroids from boundaries — calculate_centroids","text":"Calculate centroids boundaries","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate centroids from boundaries — calculate_centroids","text":"","code":"calculate_centroids(df_boundary)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate centroids from boundaries — calculate_centroids","text":"df_boundary data frame boundaries.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate centroids from boundaries — calculate_centroids","text":"data frame centroids.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate entropy from a probability vector — calculate_entropy","title":"Calculate entropy from a probability vector — calculate_entropy","text":"Calculate entropy probability vector","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate entropy from a probability vector — calculate_entropy","text":"","code":"calculate_entropy(p)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate entropy from a probability vector — calculate_entropy","text":"p numeric vector probabilities.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate entropy from a probability vector — calculate_entropy","text":"calculated entropy value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute entropy for a given matrix — compute_cell_entropy","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"Compute entropy given matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"","code":"compute_cell_entropy(cell_segments_mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"cell_segments_mat matrix compute entropy .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"vector entropy values.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate prop for entropy — countsprop","title":"Calculate prop for entropy — countsprop","text":"Calculate prop entropy","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate prop for entropy — countsprop","text":"","code":"countsprop(counts)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate prop for entropy — countsprop","text":"counts vector integers","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate prop for entropy — countsprop","text":"proportion","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a scaled data frame — create_scaled_df_sub","title":"Create a scaled data frame — create_scaled_df_sub","text":"Create scaled data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a scaled data frame — create_scaled_df_sub","text":"","code":"create_scaled_df_sub(s, df_circle, k = 5)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a scaled data frame — create_scaled_df_sub","text":"s numeric scaling factor. df_circle data frame scale. k numeric value, defaulting 8.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a scaled data frame — create_scaled_df_sub","text":"scaled data frame.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a scaled data frame — create_scaled_df_super","title":"Create a scaled data frame — create_scaled_df_super","text":"Create scaled data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a scaled data frame — create_scaled_df_super","text":"","code":"create_scaled_df_super(s, df_circle, k = 5)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a scaled data frame — create_scaled_df_super","text":"s numeric scaling factor. df_circle data frame scale. k numeric value, defaulting 8.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a scaled data frame — create_scaled_df_super","text":"scaled data frame.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Create sector data frame from circle data — create_sector_df","title":"Create sector data frame from circle data — create_sector_df","text":"function takes data frame circle data segment IDs locations, returns data frame sectors scaled coordinates.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create sector data frame from circle data — create_sector_df","text":"","code":"create_sector_df(df)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create sector data frame from circle data — create_sector_df","text":"df data frame containing circle data segment IDs, x y locations.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create sector data frame from circle data — create_sector_df","text":"data frame coordinates sector.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":null,"dir":"Reference","previous_headings":"","what":"Create sectors from a given data frame — create_sectors","title":"Create sectors from a given data frame — create_sectors","text":"Create sectors given data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create sectors from a given data frame — create_sectors","text":"","code":"create_sectors(df)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create sectors from a given data frame — create_sectors","text":"df data frame create sectors .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create sectors from a given data frame — create_sectors","text":"data frame sectors.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundaries from a given object — extract_boundaries","title":"Extract boundaries from a given object — extract_boundaries","text":"Extract boundaries given object","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundaries from a given object — extract_boundaries","text":"","code":"extract_boundaries(me)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundaries from a given object — extract_boundaries","text":"object extract boundaries .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundaries from a given object — extract_boundaries","text":"data frame extracted boundaries.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"Extract boundaries calculate centroids","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"","code":"extract_boundaries_and_centroids(me)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"object process.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"list containing data frame boundaries data frame centroids.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"Extract submatrix corresponding segment matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"","code":"extract_cell_segments(mat, cell)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"mat matrix process. cell character string indicating segment extract.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"submatrix provided matrix.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate scale factors for all values of k — generate_scale_factors_all","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"Generate scale factors values k","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"","code":"generate_scale_factors_all(k)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"k numeric value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"vector scale factors.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"Generate scale factors outside values ks","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"","code":"generate_scale_factors_all_outside(k)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"k numeric value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"vector scale factors outside values.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract unique segments from matrix column names — get_cells","title":"Extract unique segments from matrix column names — get_cells","text":"Extract unique segments matrix column names","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract unique segments from matrix column names — get_cells","text":"","code":"get_cells(mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract unique segments from matrix column names — get_cells","text":"mat matrix process.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract unique segments from matrix column names — get_cells","text":"character vector unique segments.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Boundaries to Molecule Experiment Object — loadBoundaries","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"function takes Molecule Experiment () object input enriches boundary data variety assays. currently supported assays : Sub-sector polygons Sub-concentric polygons Super-sector polygons Super-concentric polygons function internally processes assay, extracts respective boundary information, updates original object new data.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"","code":"loadBoundaries(me, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"MoleculeExperiment () object ... arguments passed GenerateFeatureData","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"enriched Molecule Experiment () object includes boundary information supported assays.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"","code":"data(example_me) me <- loadBoundaries(me) me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (5): cell subsector subconcentric supersector #> superconcentric #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071 #> - subsector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (60): 67500_01 67500_02 ... 67527_11 67527_12 #> -- sample2: #> ---- segments (108): 65043_01 65043_02 ... 65071_11 65071_12 #> - subconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (30): 67500_01 67500_02 ... 67527_05 67527_06 #> -- sample2: #> ---- segments (54): 65043_01 65043_02 ... 65071_05 65071_06 #> - supersector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (55): 67500_01 67500_02 ... 67527_10 67527_11 #> -- sample2: #> ---- segments (99): 65043_01 65043_02 ... 65071_10 65071_11 #> - superconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (35): 67500_01 67500_02 ... 67527_06 67527_07 #> -- sample2: #> ---- segments (63): 65043_01 65043_02 ... 65071_06 65071_07"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":null,"dir":"Reference","previous_headings":"","what":"make assay data — make_assay_data","title":"make assay data — make_assay_data","text":"make assay data","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"make assay data — make_assay_data","text":"","code":"make_assay_data(df_list, concatenateFeatures = FALSE)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"make assay data — make_assay_data","text":"df_list list data frames concatenateFeatures logical whether concatenate features (default FALSE)","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"make assay data — make_assay_data","text":"concatenateFeatures == TRUE, single data frame, otherwise list containing data frames","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute entropy for the entire matrix — matrix_entropy","title":"Compute entropy for the entire matrix — matrix_entropy","text":"Compute entropy entire matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute entropy for the entire matrix — matrix_entropy","text":"","code":"matrix_entropy(mat, nCores = 1)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute entropy for the entire matrix — matrix_entropy","text":"mat matrix compute entropy . nCores Number cores","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute entropy for the entire matrix — matrix_entropy","text":"data frame entropy values matrix.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":null,"dir":"Reference","previous_headings":"","what":"Example MoleculeExperiment data — me","title":"Example MoleculeExperiment data — me","text":"tiny object containing cells molecules","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example MoleculeExperiment data — me","text":"","code":"data(example_me, package = 'SpatialFeatures')"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example MoleculeExperiment data — me","text":"MoleculeExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify the area_id format — modify_area_id","title":"Modify the area_id format — modify_area_id","text":"function takes area_id string modifies last segment single-digit number 1 9 adding leading zero.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify the area_id format — modify_area_id","text":"","code":"modify_area_id(id)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify the area_id format — modify_area_id","text":"id string representing area_id.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modify the area_id format — modify_area_id","text":"string modified area_id format.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate SpatialFeatures — spatialFeatures","title":"Calculate SpatialFeatures — spatialFeatures","text":"function takes MoleculeExperiment () object input calculates new molecule-based spatial features according following segmentations: Sub-sector polygons Sub-concentric polygons Super-sector polygons Super-concentric polygons function 3 key steps, 1. adds new boundaries object according subcellular supercellular segmentations, 2. calculates entropy cell featureType combinations, 3. combines entropy values SummarizedExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate SpatialFeatures — spatialFeatures","text":"","code":"spatialFeatures( me, featureTypes = c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), k = 5, nCores = 1, includeCounts = FALSE, concatenateFeatures = FALSE, ... )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate SpatialFeatures — spatialFeatures","text":"MoleculeExperiment () object featureTypes character string specifying feature type. Supported values include \"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\". k numeric value indicating number polygons calculate entropy (default 5) nCores number cores parallel processing (default 1) includeCounts logical (default FALSE) whether include gene counts features concatenateFeatures logical whether concatenate features single assay (default FALSE). FALSE output SE object multiple assays ... arguments passed loadBoundaries EntropyMatrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate SpatialFeatures — spatialFeatures","text":"SummarizedExperiment object containing spatialFeatures assay cell-level colData","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate SpatialFeatures — spatialFeatures","text":"","code":"data(example_me) se <- spatialFeatures(me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"}]
+[{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"spatialfeatures","dir":"Articles","previous_headings":"","what":"SpatialFeatures","title":"An introduction to the SpatialFeatures Package","text":"R package SpatialFeatures contains functions extract features molecule-resolved spatial transcriptomics data using objects MoleculeExperiment class.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"load-required-libraries","dir":"Articles","previous_headings":"SpatialFeatures","what":"Load Required Libraries","title":"An introduction to the SpatialFeatures Package","text":"","code":"library(SpatialFeatures) library(MoleculeExperiment) library(ggplot2) library(SummarizedExperiment) library(dplyr)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-example-dataset","dir":"Articles","previous_headings":"SpatialFeatures","what":"Create Example Dataset","title":"An introduction to the SpatialFeatures Package","text":"Load example MoleculeExperiment object Xenium data:","code":"repoDir <- system.file(\"extdata\", package = \"MoleculeExperiment\") repoDir <- paste0(repoDir, \"/xenium_V1_FF_Mouse_Brain\") me <- readXenium(repoDir, keepCols = \"essential\") me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (1): cell #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"quick-start","dir":"Articles","previous_headings":"SpatialFeatures","what":"Quick start","title":"An introduction to the SpatialFeatures Package","text":"spatialFeatures function performs three key steps. First, generates new boundaries corresponding feature types. Second, calculates entropy-based metrics feature types. Third, combines information returns SummarizedExperiment object. SpatialFeatures can run following basic command. extract feature types single assay. can also calculate gene counts within spatialFeatures function, either additional concatenated features, feature type belonging assay.","code":"se = spatialFeatures(me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries se = spatialFeatures(me, includeCounts = TRUE, concatenateFeatures = FALSE) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(5): subsector subconcentric supersector superconcentric #> genecount #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":[]},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"generate-new-boundaries-based-on-subcellular-and-supercellular-features","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Generate new boundaries based on subcellular and supercellular features","title":"An introduction to the SpatialFeatures Package","text":"function loadBoundaries() processes given data () returns feature data based multiple assay types, including: - Sub-Sector - Sub-Concentric - Super-Sector - Super-Concentric","code":"me <- SpatialFeatures::loadBoundaries(me) me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (5): cell subsector subconcentric supersector #> superconcentric #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071 #> - subsector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (60): 67500_01 67500_02 ... 67527_11 67527_12 #> -- sample2: #> ---- segments (108): 65043_01 65043_02 ... 65071_11 65071_12 #> - subconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (30): 67500_01 67500_02 ... 67527_05 67527_06 #> -- sample2: #> ---- segments (54): 65043_01 65043_02 ... 65071_05 65071_06 #> - supersector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (55): 67500_01 67500_02 ... 67527_10 67527_11 #> -- sample2: #> ---- segments (99): 65043_01 65043_02 ... 65071_10 65071_11 #> - superconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (35): 67500_01 67500_02 ... 67527_06 67527_07 #> -- sample2: #> ---- segments (63): 65043_01 65043_02 ... 65071_06 65071_07"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"draw-the-feature-boundary-plots","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Draw the Feature Boundary Plots","title":"An introduction to the SpatialFeatures Package","text":"Visualize spatial molecule cell boundary map SpatialFeature boundaries.","code":"ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"subsector\", fill = NA, colour = \"red\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"subconcentric\", fill = NA, colour = \"red\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"supersector\", fill = NA, colour = \"blue\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455)) ggplot_me() + # add molecule points and colour by feature name geom_point_me(me, byColour = \"feature_id\", size = 0.1) + # add nuclei segments and colour the border with red geom_polygon_me(me, assayName = \"superconcentric\", fill = NA, colour = \"blue\") + # add cell segments and colour by cell id geom_polygon_me(me, byFill = \"segment_id\", colour = \"black\", alpha = 0.1) + # zoom in to selected patch area coord_cartesian(xlim = c(4875, 4950), ylim = c(6385, 6455))"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-entropy-matrix","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Create Entropy Matrix","title":"An introduction to the SpatialFeatures Package","text":"function EntropyMatrix() computes entropy counts matrix MoleculeExperiment object based given assay type.","code":"ent = SpatialFeatures::EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) lapply(ent, head, n = 4) #> $subsector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0.6931472 #> Acsbg1 0.6931472 0.6931472 0.6931472 0.0000000 #> Adamts2 0.0000000 0.0000000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0.0000000 #> Acsbg1 0 0 0 0.6931472 #> Adamts2 0 0 0 0.0000000 #> Adamtsl1 0 0 0 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.5498260 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0.0000000 #> Acsbg1 0 0.6931472 #> Adamts2 0 0.0000000 #> Adamtsl1 0 0.0000000 #> #> $subconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0 #> Acsbg1 0.6931472 0.0000000 0.6931472 0 #> Adamts2 0.0000000 0.0000000 0.0000000 0 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0 #> Acsbg1 0 0 0 0 #> Adamts2 0 0 0 0 #> Adamtsl1 0 0 0 0 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.2770343 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0 #> Acsbg1 0 0 #> Adamts2 0 0 #> Adamtsl1 0 0 #> #> $supersector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0 1.332179 0.6931472 0.6931472 #> Acsbg1 0 0.000000 0.6931472 0.6931472 #> Adamts2 0 0.000000 0.0000000 0.0000000 #> Adamtsl1 0 0.000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0.5623351 1.039721 0.5982696 #> Acsbg1 0 0.0000000 0.000000 0.9502705 #> Adamts2 0 0.0000000 0.000000 0.0000000 #> Adamtsl1 0 0.0000000 0.000000 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.000000 0.6931472 0 0.0000000 #> Acsbg1 1.559581 1.0114043 0 0.6931472 #> Adamts2 0.000000 0.0000000 0 0.0000000 #> Adamtsl1 0.000000 0.0000000 0 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.0000000 0.0000000 #> Acsbg1 0.5623351 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #> #> $superconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 1.5607104 1.05492 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.00000 0.6931472 0.6931472 #> Adamts2 0.0000000 0.00000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.00000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0.0000000 1.039721 1.386294 1.549826 #> Acsbg1 0.6931472 0.000000 0.000000 1.054920 #> Adamts2 0.0000000 0.000000 0.000000 0.000000 #> Adamtsl1 0.0000000 0.000000 0.000000 0.000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.6931472 0.6931472 1.386294 0.0000000 #> Acsbg1 1.3208883 1.3296613 0.000000 0.6931472 #> Adamts2 0.0000000 0.0000000 0.000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.000000 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"create-summarizedexperiment-object","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Create SummarizedExperiment Object","title":"An introduction to the SpatialFeatures Package","text":"function EntropySummarizedExperiment() Convert entropy matrix SummarizedExperiment object. also want gene counts, can include parameter","code":"se = SpatialFeatures::EntropySummarizedExperiment(ent, me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries se = EntropySummarizedExperiment(ent, me, includeCounts = TRUE) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(5): subsector subconcentric supersector superconcentric #> genecount #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"inspect-the-spatialfeatures-summarizedexperiment-object","dir":"Articles","previous_headings":"Step-by-step SpatialFeatures","what":"Inspect the SpatialFeatures SummarizedExperiment Object","title":"An introduction to the SpatialFeatures Package","text":"Check structure content SummarizedExperiment object:","code":"se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(5): subsector subconcentric supersector superconcentric #> genecount #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries colData(se) #> DataFrame with 14 rows and 5 columns #> Cell Sample_id x_central y_central #> #> sample1.67500 sample1.67500 sample1 4896.19 6415.14 #> sample1.67512 sample1.67512 sample1 4909.74 6411.80 #> sample1.67515 sample1.67515 sample1 4912.42 6402.93 #> sample1.67521 sample1.67521 sample1 4916.01 6415.75 #> sample1.67527 sample1.67527 sample1 4923.68 6414.74 #> ... ... ... ... ... #> sample2.65063 sample2.65063 sample2 4928.03 6415.25 #> sample2.65064 sample2.65064 sample2 4896.37 6406.56 #> sample2.65067 sample2.65067 sample2 4923.71 6406.08 #> sample2.65070 sample2.65070 sample2 4902.14 6395.17 #> sample2.65071 sample2.65071 sample2 4920.63 6398.99 #> boundaries #> #> sample1.67500 4896.85:6413.46,4895.15:6413.89,4894.30:6417.71 #> sample1.67512 4901.95:6417.07,4901.52:6418.56,4900.89:6419.41 #> sample1.67515 4916.40:6412.61,4912.15:6420.05,4910.45:6430.89 #> sample1.67521 4911.51:6397.95,4907.48:6400.71,4904.07:6407.30 #> sample1.67527 4929.57:6408.36,4924.69:6409.85,4921.29:6409.85 #> ... ... #> sample2.65063 4904.71:6399.65,4898.76:6401.35,4894.30:6407.94 #> sample2.65064 4905.77:6404.11,4906.20:6407.73,4907.05:6412.19 #> sample2.65067 4908.96:6395.61,4904.93:6399.44,4905.56:6403.26 #> sample2.65070 4919.59:6408.36,4915.98:6411.34,4915.76:6411.98 #> sample2.65071 4922.35:6404.54,4919.80:6407.94,4920.23:6413.46 rowData(se) #> DataFrame with 178 rows and 0 columns"},{"path":"https://sydneybiox.github.io/SpatialFeatures/articles/SpatialFeatures.html","id":"finish","dir":"Articles","previous_headings":"","what":"Finish","title":"An introduction to the SpatialFeatures Package","text":"","code":"sessionInfo() #> R version 4.4.1 (2024-06-14) #> Platform: x86_64-pc-linux-gnu #> Running under: Ubuntu 22.04.4 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] parallel stats4 stats graphics grDevices utils datasets #> [8] methods base #> #> other attached packages: #> [1] ggplot2_3.5.1 SpatialFeatures_0.0.2 #> [3] purrr_1.0.2 dplyr_1.1.4 #> [5] SummarizedExperiment_1.34.0 Biobase_2.64.0 #> [7] GenomicRanges_1.56.1 GenomeInfoDb_1.40.1 #> [9] IRanges_2.38.1 S4Vectors_0.42.1 #> [11] BiocGenerics_0.50.0 MatrixGenerics_1.16.0 #> [13] matrixStats_1.3.0 MoleculeExperiment_1.4.1 #> [15] BiocStyle_2.32.1 #> #> loaded via a namespace (and not attached): #> [1] tidyselect_1.2.1 EBImage_4.46.0 #> [3] farver_2.1.2 bitops_1.0-8 #> [5] fastmap_1.2.0 SingleCellExperiment_1.26.0 #> [7] RCurl_1.98-1.16 digest_0.6.36 #> [9] lifecycle_1.0.4 terra_1.7-78 #> [11] magrittr_2.0.3 compiler_4.4.1 #> [13] rlang_1.1.4 sass_0.4.9 #> [15] tools_4.4.1 utf8_1.2.4 #> [17] yaml_2.3.10 data.table_1.15.4 #> [19] knitr_1.48 labeling_0.4.3 #> [21] S4Arrays_1.4.1 htmlwidgets_1.6.4 #> [23] bit_4.0.5 DelayedArray_0.30.1 #> [25] abind_1.4-5 BiocParallel_1.38.0 #> [27] withr_3.0.1 desc_1.4.3 #> [29] grid_4.4.1 fansi_1.0.6 #> [31] colorspace_2.1-1 scales_1.3.0 #> [33] cli_3.6.3 rmarkdown_2.27 #> [35] crayon_1.5.3 ragg_1.3.2 #> [37] generics_0.1.3 httr_1.4.7 #> [39] rjson_0.2.21 cachem_1.1.0 #> [41] zlibbioc_1.50.0 BiocManager_1.30.23 #> [43] XVector_0.44.0 tiff_0.1-12 #> [45] vctrs_0.6.5 Matrix_1.7-0 #> [47] jsonlite_1.8.8 bookdown_0.40 #> [49] fftwtools_0.9-11 bit64_4.0.5 #> [51] systemfonts_1.1.0 jpeg_0.1-10 #> [53] magick_2.8.4 locfit_1.5-9.10 #> [55] jquerylib_0.1.4 glue_1.7.0 #> [57] pkgdown_2.1.0 codetools_0.2-20 #> [59] gtable_0.3.5 UCSC.utils_1.0.0 #> [61] munsell_0.5.1 tibble_3.2.1 #> [63] pillar_1.9.0 htmltools_0.5.8.1 #> [65] GenomeInfoDbData_1.2.12 R6_2.5.1 #> [67] textshaping_0.4.0 evaluate_0.24.0 #> [69] lattice_0.22-6 highr_0.11 #> [71] png_0.1-8 SpatialExperiment_1.14.0 #> [73] bslib_0.8.0 Rcpp_1.0.13 #> [75] SparseArray_1.4.8 xfun_0.46 #> [77] fs_1.6.4 pkgconfig_2.0.3"},{"path":"https://sydneybiox.github.io/SpatialFeatures/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Shila Ghazanfar. Author, maintainer, contributor. Guan Gui. Contributor.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ghazanfar S (2024). SpatialFeatures: Entropy-based subcellular supercellular features molecule-resolved spatial omics datasets. R package version 0.0.2, https://sydneybiox.github.io/SpatialFeatures/.","code":"@Manual{, title = {SpatialFeatures: Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets}, author = {Shila Ghazanfar}, year = {2024}, note = {R package version 0.0.2}, url = {https://sydneybiox.github.io/SpatialFeatures/}, }"},{"path":"https://sydneybiox.github.io/SpatialFeatures/index.html","id":"spatialfeatures","dir":"","previous_headings":"","what":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","title":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","text":"R package incorprate features molecule-resolved spatial transcriptomics data. usage instructions package can found vignettes folder.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets","text":"can install SpatialFeatures GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"SydneyBioX/SpatialFeatures\")"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"function retrieves counts matrix Molecule Experiment object based given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"","code":"CountsMatrix(me, assayName, nCores = 1, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"Molecule Experiment object. assayName character string indicating assay type. Supported values include \"sub-sector\", \"sub-concentric\", \"sub-combo\", \"super-concentric\", \"super-combo\". nCores Number cores parallel processing (default 1) ... arguments passing MoleculeExperiment::countMolecules","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"counts matrix corresponding specified assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/CountsMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Counts Matrix from Molecule Experiment based on Assay Type — CountsMatrix","text":"","code":"if (FALSE) { # \\dontrun{ # Assuming `data_obj` is your Molecule Experiment object cm = CountsMatrix(data_obj, assayName = \"sub-sector\") } # }"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"function computes entropy counts matrix Molecule Experiment object based given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"","code":"EntropyMatrix(me, featureTypes, nCores = 1, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"Molecule Experiment object. featureTypes character string specifying feature type. Supported values include \"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\". nCores Number cores ... arguments passing CountsMatrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"matrix representing entropy values corresponding given assay type.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropyMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the Entropy of a Counts Matrix — EntropyMatrix","text":"","code":"data(example_me) me <- loadBoundaries(me) ent <- EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) lapply(ent, head, n = 4) #> $subsector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0.6931472 #> Acsbg1 0.6931472 0.6931472 0.6931472 0.0000000 #> Adamts2 0.0000000 0.0000000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0.0000000 #> Acsbg1 0 0 0 0.6931472 #> Adamts2 0 0 0 0.0000000 #> Adamtsl1 0 0 0 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.5498260 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0.0000000 #> Acsbg1 0 0.6931472 #> Adamts2 0 0.0000000 #> Adamtsl1 0 0.0000000 #> #> $subconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0.5623351 0.6931472 0.6365142 0 #> Acsbg1 0.6931472 0.0000000 0.6931472 0 #> Adamts2 0.0000000 0.0000000 0.0000000 0 #> Adamtsl1 0.0000000 0.0000000 0.0000000 0 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0 0 0 #> Acsbg1 0 0 0 0 #> Adamts2 0 0 0 0 #> Adamtsl1 0 0 0 0 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 1.2770343 0 0.6931472 0 #> Acsbg1 0.6931472 0 0.0000000 0 #> Adamts2 0.0000000 0 0.0000000 0 #> Adamtsl1 0.0000000 0 0.0000000 0 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0 0 #> Acsbg1 0 0 #> Adamts2 0 0 #> Adamtsl1 0 0 #> #> $supersector #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 0 1.332179 0.6931472 0.6931472 #> Acsbg1 0 0.000000 0.6931472 0.6931472 #> Adamts2 0 0.000000 0.0000000 0.0000000 #> Adamtsl1 0 0.000000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0 0.5623351 1.039721 0.5982696 #> Acsbg1 0 0.0000000 0.000000 0.9502705 #> Adamts2 0 0.0000000 0.000000 0.0000000 #> Adamtsl1 0 0.0000000 0.000000 0.0000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.000000 0.6931472 0 0.0000000 #> Acsbg1 1.559581 1.0114043 0 0.6931472 #> Adamts2 0.000000 0.0000000 0 0.0000000 #> Adamtsl1 0.000000 0.0000000 0 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.0000000 0.0000000 #> Acsbg1 0.5623351 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #> #> $superconcentric #> sample1.67500 sample1.67512 sample1.67515 sample1.67521 #> 2010300C02Rik 1.5607104 1.05492 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.00000 0.6931472 0.6931472 #> Adamts2 0.0000000 0.00000 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.00000 0.0000000 0.0000000 #> sample1.67527 sample2.65043 sample2.65044 sample2.65051 #> 2010300C02Rik 0.0000000 1.039721 1.386294 1.549826 #> Acsbg1 0.6931472 0.000000 0.000000 1.054920 #> Adamts2 0.0000000 0.000000 0.000000 0.000000 #> Adamtsl1 0.0000000 0.000000 0.000000 0.000000 #> sample2.65055 sample2.65063 sample2.65064 sample2.65067 #> 2010300C02Rik 0.6931472 0.6931472 1.386294 0.0000000 #> Acsbg1 1.3208883 1.3296613 0.000000 0.6931472 #> Adamts2 0.0000000 0.0000000 0.000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 0.000000 0.0000000 #> sample2.65070 sample2.65071 #> 2010300C02Rik 0.6931472 0.0000000 #> Acsbg1 0.6931472 0.6365142 #> Adamts2 0.0000000 0.0000000 #> Adamtsl1 0.0000000 0.0000000 #>"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"function takes list data frames Molecule Experiment object constructs SummarizedExperiment object specified data structure.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"","code":"EntropySummarizedExperiment( df_list, me, includeCounts = FALSE, concatenateFeatures = FALSE, nCores = 1 )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"df_list list data frames, containing assay data. Molecule Experiment object. includeCounts logical (default FALSE) whether include gene counts features concatenateFeatures logical whether concatenate features single assay (default FALSE). FALSE output SE object multiple assays nCores Number cores (default 1)","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"SummarizedExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/EntropySummarizedExperiment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a SummarizedExperiment Object from a List of Data Frames — EntropySummarizedExperiment","text":"","code":"data(example_me) me <- loadBoundaries(me) ent <- EntropyMatrix(me, c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), nCores = 1) se <- EntropySummarizedExperiment(ent, me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"comprehensive function processes given data () returns feature data based multiple assay types. supported assays encapsulated within function include: Sub-sector polygons Sub-concentric polygons Sub-combo polygons Super-concentric polygons Super-combo polygons assays represent various spatial subdivisions transformations, addressing unique feature characteristics. results assay combined returned list dataframes.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"","code":"GenerateFeatureData( me, featureTypes = c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), k = 5 )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"input data object. object contains spatial information, typically regarding segments regions interest. featureTypes Character vector containing feature types calculate. k numeric value indicating scaling factor concentric polygons. Defaults 5.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/GenerateFeatureData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Feature Data Based on Assay Type Combining Various Polygon Assays — GenerateFeatureData","text":"list containing dataframes assay type: subsector: Feature data sub-sector polygons. subconcentric: Feature data sub-concentric polygons. supersector: Feature data super-sector polygons. superconcentric: Feature data super-concentric polygons.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"Convert cumulative counts concentric polygons annuli polygon counts","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"","code":"annuli_counts(mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"mat matrix cumulative counts.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/annuli_counts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert cumulative counts in concentric polygons to annuli polygon counts — annuli_counts","text":"matrix annuli polygon counts.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate centroids from boundaries — calculate_centroids","title":"Calculate centroids from boundaries — calculate_centroids","text":"Calculate centroids boundaries","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate centroids from boundaries — calculate_centroids","text":"","code":"calculate_centroids(df_boundary)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate centroids from boundaries — calculate_centroids","text":"df_boundary data frame boundaries.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_centroids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate centroids from boundaries — calculate_centroids","text":"data frame centroids.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate entropy from a probability vector — calculate_entropy","title":"Calculate entropy from a probability vector — calculate_entropy","text":"Calculate entropy probability vector","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate entropy from a probability vector — calculate_entropy","text":"","code":"calculate_entropy(p)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate entropy from a probability vector — calculate_entropy","text":"p numeric vector probabilities.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/calculate_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate entropy from a probability vector — calculate_entropy","text":"calculated entropy value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute entropy for a given matrix — compute_cell_entropy","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"Compute entropy given matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"","code":"compute_cell_entropy(cell_segments_mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"cell_segments_mat matrix compute entropy .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/compute_cell_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute entropy for a given matrix — compute_cell_entropy","text":"vector entropy values.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate prop for entropy — countsprop","title":"Calculate prop for entropy — countsprop","text":"Calculate prop entropy","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate prop for entropy — countsprop","text":"","code":"countsprop(counts)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate prop for entropy — countsprop","text":"counts vector integers","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/countsprop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate prop for entropy — countsprop","text":"proportion","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a scaled data frame — create_scaled_df_sub","title":"Create a scaled data frame — create_scaled_df_sub","text":"Create scaled data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a scaled data frame — create_scaled_df_sub","text":"","code":"create_scaled_df_sub(s, df_circle, k = 5)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a scaled data frame — create_scaled_df_sub","text":"s numeric scaling factor. df_circle data frame scale. k numeric value, defaulting 8.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_sub.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a scaled data frame — create_scaled_df_sub","text":"scaled data frame.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a scaled data frame — create_scaled_df_super","title":"Create a scaled data frame — create_scaled_df_super","text":"Create scaled data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a scaled data frame — create_scaled_df_super","text":"","code":"create_scaled_df_super(s, df_circle, k = 5)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a scaled data frame — create_scaled_df_super","text":"s numeric scaling factor. df_circle data frame scale. k numeric value, defaulting 8.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_scaled_df_super.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a scaled data frame — create_scaled_df_super","text":"scaled data frame.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Create sector data frame from circle data — create_sector_df","title":"Create sector data frame from circle data — create_sector_df","text":"function takes data frame circle data segment IDs locations, returns data frame sectors scaled coordinates.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create sector data frame from circle data — create_sector_df","text":"","code":"create_sector_df(df)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create sector data frame from circle data — create_sector_df","text":"df data frame containing circle data segment IDs, x y locations.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sector_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create sector data frame from circle data — create_sector_df","text":"data frame coordinates sector.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":null,"dir":"Reference","previous_headings":"","what":"Create sectors from a given data frame — create_sectors","title":"Create sectors from a given data frame — create_sectors","text":"Create sectors given data frame","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create sectors from a given data frame — create_sectors","text":"","code":"create_sectors(df)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create sectors from a given data frame — create_sectors","text":"df data frame create sectors .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/create_sectors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create sectors from a given data frame — create_sectors","text":"data frame sectors.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundaries from a given object — extract_boundaries","title":"Extract boundaries from a given object — extract_boundaries","text":"Extract boundaries given object","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundaries from a given object — extract_boundaries","text":"","code":"extract_boundaries(me)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundaries from a given object — extract_boundaries","text":"object extract boundaries .","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundaries from a given object — extract_boundaries","text":"data frame extracted boundaries.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"Extract boundaries calculate centroids","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"","code":"extract_boundaries_and_centroids(me)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"object process.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_boundaries_and_centroids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract boundaries and calculate centroids — extract_boundaries_and_centroids","text":"list containing data frame boundaries data frame centroids.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"Extract submatrix corresponding segment matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"","code":"extract_cell_segments(mat, cell)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"mat matrix process. cell character string indicating segment extract.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/extract_cell_segments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract a submatrix corresponding to a segment from a matrix — extract_cell_segments","text":"submatrix provided matrix.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate scale factors for all values of k — generate_scale_factors_all","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"Generate scale factors values k","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"","code":"generate_scale_factors_all(k)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"k numeric value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate scale factors for all values of k — generate_scale_factors_all","text":"vector scale factors.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"Generate scale factors outside values ks","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"","code":"generate_scale_factors_all_outside(k)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"k numeric value.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/generate_scale_factors_all_outside.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate scale factors for all outside values of ks — generate_scale_factors_all_outside","text":"vector scale factors outside values.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract unique segments from matrix column names — get_cells","title":"Extract unique segments from matrix column names — get_cells","text":"Extract unique segments matrix column names","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract unique segments from matrix column names — get_cells","text":"","code":"get_cells(mat)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract unique segments from matrix column names — get_cells","text":"mat matrix process.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/get_cells.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract unique segments from matrix column names — get_cells","text":"character vector unique segments.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":null,"dir":"Reference","previous_headings":"","what":"Load Boundaries to Molecule Experiment Object — loadBoundaries","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"function takes Molecule Experiment () object input enriches boundary data variety assays. currently supported assays : Sub-sector polygons Sub-concentric polygons Super-sector polygons Super-concentric polygons function internally processes assay, extracts respective boundary information, updates original object new data.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"","code":"loadBoundaries(me, ...)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"MoleculeExperiment () object ... arguments passed GenerateFeatureData","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"enriched Molecule Experiment () object includes boundary information supported assays.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/loadBoundaries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load Boundaries to Molecule Experiment Object — loadBoundaries","text":"","code":"data(example_me) me <- loadBoundaries(me) me #> MoleculeExperiment class #> #> molecules slot (1): detected #> - detected: #> samples (2): sample1 sample2 #> -- sample1: #> ---- features (137): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (962) #> ---- location range: [4900,4919.98] x [6400.02,6420] #> -- sample2: #> ---- features (143): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> ---- molecules (777) #> ---- location range: [4900.01,4919.98] x [6400.16,6419.97] #> #> #> boundaries slot (5): cell subsector subconcentric supersector #> superconcentric #> - cell: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (5): 67500 67512 67515 67521 67527 #> -- sample2: #> ---- segments (9): 65043 65044 ... 65070 65071 #> - subsector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (60): 67500_01 67500_02 ... 67527_11 67527_12 #> -- sample2: #> ---- segments (108): 65043_01 65043_02 ... 65071_11 65071_12 #> - subconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (30): 67500_01 67500_02 ... 67527_05 67527_06 #> -- sample2: #> ---- segments (54): 65043_01 65043_02 ... 65071_05 65071_06 #> - supersector: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (55): 67500_01 67500_02 ... 67527_10 67527_11 #> -- sample2: #> ---- segments (99): 65043_01 65043_02 ... 65071_10 65071_11 #> - superconcentric: #> samples (2): sample1 sample2 #> -- sample1: #> ---- segments (35): 67500_01 67500_02 ... 67527_06 67527_07 #> -- sample2: #> ---- segments (63): 65043_01 65043_02 ... 65071_06 65071_07"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":null,"dir":"Reference","previous_headings":"","what":"make assay data — make_assay_data","title":"make assay data — make_assay_data","text":"make assay data","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"make assay data — make_assay_data","text":"","code":"make_assay_data(df_list, concatenateFeatures = FALSE)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"make assay data — make_assay_data","text":"df_list list data frames concatenateFeatures logical whether concatenate features (default FALSE)","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/make_assay_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"make assay data — make_assay_data","text":"concatenateFeatures == TRUE, single data frame, otherwise list containing data frames","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute entropy for the entire matrix — matrix_entropy","title":"Compute entropy for the entire matrix — matrix_entropy","text":"Compute entropy entire matrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute entropy for the entire matrix — matrix_entropy","text":"","code":"matrix_entropy(mat, nCores = 1)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute entropy for the entire matrix — matrix_entropy","text":"mat matrix compute entropy . nCores Number cores","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/matrix_entropy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute entropy for the entire matrix — matrix_entropy","text":"data frame entropy values matrix.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":null,"dir":"Reference","previous_headings":"","what":"Example MoleculeExperiment data — me","title":"Example MoleculeExperiment data — me","text":"tiny object containing cells molecules","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example MoleculeExperiment data — me","text":"","code":"data(example_me, package = 'SpatialFeatures')"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/me.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example MoleculeExperiment data — me","text":"MoleculeExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Modify the area_id format — modify_area_id","title":"Modify the area_id format — modify_area_id","text":"function takes area_id string modifies last segment single-digit number 1 9 adding leading zero.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Modify the area_id format — modify_area_id","text":"","code":"modify_area_id(id)"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Modify the area_id format — modify_area_id","text":"id string representing area_id.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/modify_area_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Modify the area_id format — modify_area_id","text":"string modified area_id format.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate SpatialFeatures — spatialFeatures","title":"Calculate SpatialFeatures — spatialFeatures","text":"function takes MoleculeExperiment () object input calculates new molecule-based spatial features according following segmentations: Sub-sector polygons Sub-concentric polygons Super-sector polygons Super-concentric polygons function 3 key steps, 1. adds new boundaries object according subcellular supercellular segmentations, 2. calculates entropy cell featureType combinations, 3. combines entropy values SummarizedExperiment object.","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate SpatialFeatures — spatialFeatures","text":"","code":"spatialFeatures( me, featureTypes = c(\"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\"), k = 5, nCores = 1, includeCounts = FALSE, concatenateFeatures = FALSE, ... )"},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate SpatialFeatures — spatialFeatures","text":"MoleculeExperiment () object featureTypes character string specifying feature type. Supported values include \"subsector\", \"subconcentric\", \"supersector\", \"superconcentric\". k numeric value indicating number polygons calculate entropy (default 5) nCores number cores parallel processing (default 1) includeCounts logical (default FALSE) whether include gene counts features concatenateFeatures logical whether concatenate features single assay (default FALSE). FALSE output SE object multiple assays ... arguments passed loadBoundaries EntropyMatrix","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate SpatialFeatures — spatialFeatures","text":"SummarizedExperiment object containing spatialFeatures assay cell-level colData","code":""},{"path":"https://sydneybiox.github.io/SpatialFeatures/reference/spatialFeatures.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate SpatialFeatures — spatialFeatures","text":"","code":"data(example_me) se <- spatialFeatures(me) se #> class: SummarizedExperiment #> dim: 178 14 #> metadata(0): #> assays(4): subsector subconcentric supersector superconcentric #> rownames(178): 2010300C02Rik Acsbg1 ... Zfp536 Zfpm2 #> rowData names(0): #> colnames(14): sample1.67500 sample1.67512 ... sample2.65070 #> sample2.65071 #> colData names(5): Cell Sample_id x_central y_central boundaries"}]