--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` # spatialDE <!-- badges: start --> [](https://www.tidyverse.org/lifecycle/#experimental) [](https://github.com/sales-lab/spatialDE/actions) [](https://codecov.io/gh/sales-lab/spatialDE?branch=main) [](https://bioconductor.org/checkResults/release/bioc-LATEST/spatialDE) [](https://bioconductor.org/checkResults/devel/bioc-LATEST/spatialDE) <!-- badges: end --> The **spatialDE** package provides an R wrapper for the Python SpatialDE library, using `r BiocStyle::CRANpkg("reticulate")` and `r BiocStyle::Biocpkg("basilisk")`. [SpatialDE](https://github.com/Teichlab/SpatialDE), by [Svensson et al., 2018][Svensson2018], is a method to identify spatially variable genes (SVGs) in spatially resolved transcriptomics data. This package started as part of the [BiocSpatialChallenges](https://helenalc.github.io/BiocSpatialChallenges/index.html). ## Installation instructions Get the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `r BiocStyle::Biocpkg("spatialDE")` from [*Bioconductor*](http://bioconductor.org/) using the following code: ```{r 'install', eval = FALSE} if (!requireNamespace("BiocManager", quietly = TRUE)) { install.packages("BiocManager") } BiocManager::install("spatialDE") ``` The development version of **spatialDE** can be installed from [GitHub](https://github.com/sales-lab/spatialDE) with: ```{r 'install_dev', eval = FALSE} if (!requireNamespace("BiocManager", quietly = TRUE)) { install.packages("BiocManager") BiocManager::install("sales-lab/spatialDE") ``` ## Basic usage ```{r usage, eval=TRUE} library(spatialDE) spe <- mockSVG(return_SPE = TRUE) de_results <- spatialDE(spe) head(de_results) ``` ## Citation Below is the citation output from using `citation('spatialDE')` in R. Please run this yourself to check for any updates on how to cite __spatialDE__. Please note that this package merely provides a wrapper to use the original Python methods in R. If you find these methods useful, please also consider citing the [original paper][Svensson2018]. ```{r 'citation', eval = requireNamespace('spatialDE'), echo = FALSE, comment = ""} print(citation('spatialDE'), bibtex = TRUE) ``` ## Code of Conduct Please note that the **spatialDE** project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. ## Useful links - `r BiocStyle::Biocpkg("SpatialExperiment")` - [BiocSpatialChallenges](https://helenalc.github.io/BiocSpatialChallenges/index.html) This package was developed using `r BiocStyle::Biocpkg('biocthis')`. [Svensson2018]: https://doi.org/10.1038/nmeth.4636