https://github.com/bioconductor-source/smoppix
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: bioconductor-source
- Language: R
- Default Branch: devel
- Size: 24.7 MB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 2 years ago
· Last pushed almost 2 years ago
Metadata Files
Readme
README.Rmd
--- output: github_document title: "SMOPPIX: Single-MOlecule sPatial omics data analysed using the Probabilistic IndeX" header-includes: - \usepackage{titling} - \pretitle{\begin{center} \includegraphics[width=2in,height=2in]{inst/Smoppix.jpg}\LARGE\\} - \posttitle{\end{center}} --- This repo provides code for analyzing single-molecule spatial omics data and cell type location data using probabilistic indices. A simple use-case is shown below, more extensive documentation can be found in the vignette The package can be installed from GitHub as follows: ```{r installAndLoadGitHub, eval = FALSE} library(devtools) install_github("sthawinke/smoppix") ``` ```{r install, eval = FALSE, echo = FALSE} library(Biocmanager) install("smoppix") ``` Once installed, you can load the package ```{r loadSmoppix} library(smoppix) ``` Patterns that can be detected by _smoppix_:
![]()
For illustration, we now load an example dataset, contained in the package. It is in table format, so we first convert it to a _spatstat_ hyperframe. ```{r loadYang} data(Yang) hypYang <- buildHyperFrame(Yang, coordVars = c("x", "y"), imageVars = c("day", "root", "section") ) ``` The number of unique images found is printed, make sure that this is what you expected. Now to make completely sure the software has understood us, we make an exploratory plot: ```{r explPlot, fig.height = 6} plotExplore(hypYang) ``` As an example analysis, we estimate the univariate nearest neighbour probabilistic index as a measure of aggregation (clustering): ```{r nn} nnObj <- estPis(hypYang, pis = "nn", null = "background", verbose = FALSE) ``` We add a variance weighting function to prepare for analysis and plot it: ```{r wf} nnObj <- addWeightFunction(nnObj, designVars = c("day", "root")) plotWf(nnObj, pi = "nn") ``` As expected, the weight allotted to the point pattern increases with the number of molecules in it: denser patterns provide more precise estimates of localization patterns. Next is the inference step: we fit linear mixed models, and show the most significant results: ```{r inference} allModsNN <- fitLMMs(nnObj, fixedVars = "day", randomVars = "root") head(getResults(allModsNN, "nn", "Intercept")) ``` Let's make it visual and plot the most significantly aggregated transcripts: ```{r plotTopRes} plotTopResults(hypYang, allModsNN, pi = "nn") ``` Finally write the results to a spreadsheet: ```{r writeToSpreadsheet, eval = FALSE} writeToXlsx(allModsNN, file = "myfile.xlsx") ```
Owner
- Name: (WIP DEV) Bioconductor Packages
- Login: bioconductor-source
- Kind: organization
- Email: maintainer@bioconductor.org
- Website: https://bioconductor.org
- Repositories: 1
- Profile: https://github.com/bioconductor-source
Source code for packages accepted into Bioconductor
GitHub Events
Total
Last Year
Dependencies
DESCRIPTION
cran
- R >= 4.4.0 depends
- BiocParallel * imports
- Matrix * imports
- Rcpp >= 1.0.11 imports
- Rdpack * imports
- SpatialExperiment * imports
- SummarizedExperiment * imports
- extraDistr * imports
- ggplot2 * imports
- grDevices * imports
- graphics * imports
- lme4 * imports
- lmerTest * imports
- methods * imports
- openxlsx * imports
- scam * imports
- spatstat.geom >= 3.2.0 imports
- spatstat.model * imports
- spatstat.random * imports
- stats * imports
- utils * imports
- DropletUtils * suggests
- RImageJROI * suggests
- ape * suggests
- funkycells * suggests
- glmnet * suggests
- htmltools * suggests
- knitr * suggests
- polyCub * suggests
- rmarkdown * suggests
- sp * suggests
- testthat * suggests
SMOPPIX: Single-MOlecule sPatial omics data analysed using the Probabilistic IndeX"
header-includes:
- \usepackage{titling}
- \pretitle{\begin{center}
\includegraphics[width=2in,height=2in]{inst/Smoppix.jpg}\LARGE\\}
- \posttitle{\end{center}}
---
This repo provides code for analyzing single-molecule spatial omics data and cell type location data using probabilistic indices. A simple use-case is shown below, more extensive documentation can be found in the vignette
The package can be installed from GitHub as follows:
```{r installAndLoadGitHub, eval = FALSE}
library(devtools)
install_github("sthawinke/smoppix")
```
```{r install, eval = FALSE, echo = FALSE}
library(Biocmanager)
install("smoppix")
```
Once installed, you can load the package
```{r loadSmoppix}
library(smoppix)
```
Patterns that can be detected by _smoppix_:
For illustration, we now load an example dataset, contained in the package. It is in table format, so we first convert it to a _spatstat_ hyperframe.
```{r loadYang}
data(Yang)
hypYang <- buildHyperFrame(Yang,
coordVars = c("x", "y"),
imageVars = c("day", "root", "section")
)
```
The number of unique images found is printed, make sure that this is what you expected. Now to make completely sure the software has understood us, we make an exploratory plot:
```{r explPlot, fig.height = 6}
plotExplore(hypYang)
```
As an example analysis, we estimate the univariate nearest neighbour probabilistic index as a measure of aggregation (clustering):
```{r nn}
nnObj <- estPis(hypYang, pis = "nn", null = "background", verbose = FALSE)
```
We add a variance weighting function to prepare for analysis and plot it:
```{r wf}
nnObj <- addWeightFunction(nnObj, designVars = c("day", "root"))
plotWf(nnObj, pi = "nn")
```
As expected, the weight allotted to the point pattern increases with the number of molecules in it: denser patterns provide more precise estimates of localization patterns.
Next is the inference step: we fit linear mixed models, and show the most significant results:
```{r inference}
allModsNN <- fitLMMs(nnObj, fixedVars = "day", randomVars = "root")
head(getResults(allModsNN, "nn", "Intercept"))
```
Let's make it visual and plot the most significantly aggregated transcripts:
```{r plotTopRes}
plotTopResults(hypYang, allModsNN, pi = "nn")
```
Finally write the results to a spreadsheet:
```{r writeToSpreadsheet, eval = FALSE}
writeToXlsx(allModsNN, file = "myfile.xlsx")
```