Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ jobs:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools-version }}

## Windows dependencies
- name: Install Windows system dependencies
# Install SimpleITK
- name: Install SimpleITK (Win)
if: runner.os == 'Windows'
run: |
## Edit below if you have any Windows system dependencies
dest <- "SimpleITK_2.5.3.zip"
download.file("https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases/download/2.5.3/SimpleITK_2.5.3.zip",
destfile = dest, mode = "wb")
install.packages(dest, repos = NULL, type = "binary")
shell: Rscript {0}

# Install SimpleITK
- name: Install SimpleITK (macOS)
if: runner.os == 'macOS'
run: |
dest <- "SimpleITK_2.5.3.tgz"
download.file("https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases/download/2.5.3/SimpleITK_2.5.3.tgz",
destfile = dest, mode = "wb")
install.packages(dest, repos = NULL, type = "binary")
shell: Rscript {0}

## linux dependencies
Expand Down Expand Up @@ -151,23 +164,9 @@ jobs:
# All Other dependencies
- name: Install Suggested dependencies
run: |
# TODO: install RCDT from archive for now
# install.packages("colorsGen")
# install.packages("Polychrome")
# install.packages("rgl")
# install.packages("Rvcg")
# install.packages("gplots")
# install.packages("xfun")
# dest <- file.path(tempdir(), "RCDT_1.3.0.tar.gz")
# download.file(
# url = "https://cran.r-project.org/src/contrib/Archive/RCDT/RCDT_1.3.0.tar.gz",
# destfile = dest,
# mode = "wb"
# )
# install.packages(dest, repos = NULL, type = "source")
# TODO: change install location of RCDT
devtools::install_github("stla/RCDT")
# install.packages('RCDT', repos = c('https://stla.r-universe.dev'))


# add remaining packages
devtools::install_github('BIMSBbioinfo/VoltRonStore')
install.packages("Seurat")
Expand Down Expand Up @@ -196,8 +195,6 @@ jobs:
BiocManager::install('basilisk')
install.packages('reticulate')
install.packages('patchwork')
# TODO: for now dont install SimpleITK
# devtools::install_github("SimpleITK/SimpleITKRInstaller", configure.vars=c("MAKEJ=1", "ADDITIONAL_SITK_MODULES=-DSimpleITK_USE_ELASTIX=ON"))
shell: Rscript {0}

## R CMD Check
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# VoltRon 0.2.5

- Added instructions to install VoltRon from [R-universe](https://bimsbbioinfo.r-universe.dev/VoltRon).
- Added instructions to install SimpleITK binaries from [BIMSBbioinfo/SimpleITKRInstaller](https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases).

# VoltRon 0.2.3

- Non-rigid fine alignment with SimpleITK combined with landmark-based manual coarse alignment. Now, `registerSpatialData` function will let users to select **BSpline (SimpleITK)** method for non-rigid alignment when **Non-Rigid** methods selected.
Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,31 @@ See [https://cran.r-project.org/web/packages/rJava](https://cran.r-project.org/w

`RCDT` package has been archived as of 15.01.2026. Please install as below:

```
``` r
devtools::install_github('stla/RCDT')
```

or

``` r
install.packages('RCDT', repos = c('https://bimsbbioinfo.r-universe.dev',
'https://cloud.r-project.org'))
```

### SimpleITK

VoltRon incorporates the `SimpleITK` package to execute non-rigid alignment across assays. You can install SimpleITK from GitHub using the following command.
VoltRon incorporates the `SimpleITK` package to execute non-rigid alignment across assays. You can download MacOS-arm (.tgz) or Windows (.zip) binaries from
[https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases](https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases), and install as below:

Depending on the number of processors the user has, you can modify the `MAKEJ=6` argument. We also need `SimpleElastix` module of `SimpleITK` to be installed,
``` r
install.packages("path/to/SimpleITK_2.5.3.tgz", repos = NULL, type = "binary")
```

You can also install SimpleITK from GitHub using the following command. Depending on the number of processors the user has,
you can modify the `MAKEJ=6` argument. We also need `SimpleElastix` module of `SimpleITK` to be installed,
hence we add `-DSimpleITK_USE_ELASTIX=ON` to the `ADDITIONAL_SITK_MODULES` argument.

```
``` r
if (!require("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github(
Expand All @@ -141,7 +154,7 @@ devtools::install_github(
"ADDITIONAL_SITK_MODULES=-DSimpleITK_USE_ELASTIX=ON"))
```

For more information, plase visit the [SimpleITK](https://simpleitk.readthedocs.io/en/v2.5.0/about.html) website.
For more information, plase visit the [SimpleITK](https://simpleitk.readthedocs.io/en/v2.5.3/about.html) website.

## Docker Hub

Expand Down
11 changes: 8 additions & 3 deletions docs/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,15 @@ devtools::install_github("Huber-group-EMBL/Rarr")

### SimpleITK

VoltRon incorporates the `SimpleITK` package to execute non-rigid alignment across assays. You can install SimpleITK from GitHub using the following command.
VoltRon incorporates the `SimpleITK` package to execute non-rigid alignment across assays. You can download MacOS-arm (.tgz) or Windows (.zip) binaries from
[https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases](https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases), and install as below:

Depending on the number of processors the user has, you can modify the `MAKEJ=6` argument. We also need `SimpleElastix` module of `SimpleITK` to be installed,
hence we add `-DSimpleITK_USE_ELASTIX=ON` to the `ADDITIONAL_SITK_MODULES` argument.
``` r
install.packages("path/to/SimpleITK_2.5.3.tgz", repos = NULL, type = "binary")
```

You can also install `SimpleITK` from GitHub using the following command. Depending on the number of processors the user has,
you can modify the `MAKEJ=6` argument. We also need `SimpleElastix` module of `SimpleITK` to be installed, hence we add `-DSimpleITK_USE_ELASTIX=ON` to the `ADDITIONAL_SITK_MODULES` argument.

```r
if (!require("devtools", quietly = TRUE))
Expand Down
12 changes: 8 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,14 @@ <h3>Rarr</h3>
<div id="simpleitk" class="section level3">
<h3>SimpleITK</h3>
<p>VoltRon incorporates the <code>SimpleITK</code> package to execute
non-rigid alignment across assays. You can install SimpleITK from GitHub
using the following command.</p>
<p>Depending on the number of processors the user has, you can modify
the <code>MAKEJ=6</code> argument. We also need
non-rigid alignment across assays. You can download MacOS-arm (.tgz) or
Windows (.zip) binaries from <a
href="https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases">https://github.com/BIMSBbioinfo/SimpleITKRInstaller/releases</a>,
and install as below:</p>
<pre class="r"><code>install.packages(&quot;path/to/SimpleITK_2.5.3.tgz&quot;, repos = NULL, type = &quot;binary&quot;)</code></pre>
<p>You can also install <code>SimpleITK</code> from GitHub using the
following command. Depending on the number of processors the user has,
you can modify the <code>MAKEJ=6</code> argument. We also need
<code>SimpleElastix</code> module of <code>SimpleITK</code> to be
installed, hence we add <code>-DSimpleITK_USE_ELASTIX=ON</code> to the
<code>ADDITIONAL_SITK_MODULES</code> argument.</p>
Expand Down
8 changes: 7 additions & 1 deletion docs/registration.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,13 @@ VoltRon allows performing non-rigid image registration and spatial data alignmen
conduct a **coarse-to-fine alignment** workflow where we first perform a **global alignment** using FLANN or BRUTE-FORCE methods, and then perform
a **fine alignment** using SimpleITK. We first use either affine or homography transformation and then interpolate images, points and segments using B-spline method.

To facilitate non-rigid alignment, we require to install and build SimpleITK locally with [Elastix](https://elastix.dev/) framework.
To facilitate non-rigid alignment, we require to install the SimpleITK package as below:

```{r class.source="watch-out", eval = FALSE}
install.packages("path/to/SimpleITK_2.5.3.tgz", repos = NULL, type = "binary")
```

or if you are not using MacOS-arm or Windows, please build SimpleITK from source with [Elastix](https://elastix.dev/) module enabled. Please note that the building process may take a while.

```{r class.source="watch-out", eval = FALSE}
if (!require("devtools", quietly = TRUE))
Expand Down
9 changes: 6 additions & 3 deletions docs/registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,12 @@ <h3>Non-Rigid Alignment</h3>
alignment</strong> using SimpleITK. We first use either affine or
homography transformation and then interpolate images, points and
segments using B-spline method.</p>
<p>To facilitate non-rigid alignment, we require to install and build
SimpleITK locally with <a href="https://elastix.dev/">Elastix</a>
framework.</p>
<p>To facilitate non-rigid alignment, we require to install the
SimpleITK package as below:</p>
<pre class="r watch-out"><code>install.packages(&quot;path/to/SimpleITK_2.5.3.tgz&quot;, repos = NULL, type = &quot;binary&quot;)</code></pre>
<p>or if you are not using MacOS-arm or Windows, please build SimpleITK
from source with <a href="https://elastix.dev/">Elastix</a> module
enabled. Please note that the building process may take a while.</p>
<pre class="r watch-out"><code>if (!require(&quot;devtools&quot;, quietly = TRUE))
install.packages(&quot;devtools&quot;)
devtools::install_github(
Expand Down
17 changes: 13 additions & 4 deletions docs/voltronobjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,13 @@ <h3>Get and Set Images</h3>
<pre class="r watch-out"><code>vrImages(visium_data)
vrImages(visium_data, assay = &quot;Visium&quot;)
vrImages(visium_data, assay = &quot;Assay1&quot;)</code></pre>
<pre><code>## Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
## ℹ Please use tidy evaluation idioms with `aes()`.
## ℹ See also `vignette(&quot;ggplot2-in-packages&quot;)` for more information.
## ℹ The deprecated feature was likely used in the magick package.
## Please report the issue at &lt;https://github.com/ropensci/magick/issues&gt;.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.</code></pre>
<p><img src="voltronobjects_files/figure-html/unnamed-chunk-36-1.png" alt="" width="60%" style="display: block; margin: auto;" /></p>
<!-- <img width="50%" height="50%" src="https://bimsbstatic.mdc-berlin.de/landthaler/VoltRon/Package/images/voltronobjects_HE.png" class="center"> -->
<p><br></p>
Expand Down Expand Up @@ -833,12 +840,14 @@ <h3>features</h3>
href="#assays">vrMainAssay</a>)</p>
<pre class="r watch-out"><code>selected_features &lt;- vrFeatures(visium_data)
selected_features[1:20]</code></pre>
<pre><code>## [1] &quot;Xkr4&quot; &quot;Gm1992&quot; &quot;Gm19938&quot; &quot;Gm37381&quot; &quot;Rp1&quot; &quot;Sox17&quot; &quot;Gm37587&quot; &quot;Gm37323&quot; &quot;Mrpl15&quot; &quot;Lypla1&quot; &quot;Tcea1&quot;
## [12] &quot;Rgs20&quot; &quot;Gm16041&quot; &quot;Atp6v1h&quot; &quot;Oprk1&quot; &quot;Npbwr1&quot; &quot;Rb1cc1&quot; &quot;4732440D04Rik&quot; &quot;Alkal1&quot; &quot;St18&quot;</code></pre>
<pre><code>## [1] &quot;Xkr4&quot; &quot;Gm1992&quot; &quot;Gm19938&quot; &quot;Gm37381&quot; &quot;Rp1&quot; &quot;Sox17&quot; &quot;Gm37587&quot; &quot;Gm37323&quot;
## [9] &quot;Mrpl15&quot; &quot;Lypla1&quot; &quot;Tcea1&quot; &quot;Rgs20&quot; &quot;Gm16041&quot; &quot;Atp6v1h&quot; &quot;Oprk1&quot; &quot;Npbwr1&quot;
## [17] &quot;Rb1cc1&quot; &quot;4732440D04Rik&quot; &quot;Alkal1&quot; &quot;St18&quot;</code></pre>
<pre class="r watch-out"><code>visium_data_subset &lt;- subset(visium_data, features = selected_features[1:20])
vrFeatures(visium_data_subset)</code></pre>
<pre><code>## [1] &quot;Xkr4&quot; &quot;Gm1992&quot; &quot;Gm19938&quot; &quot;Gm37381&quot; &quot;Rp1&quot; &quot;Sox17&quot; &quot;Gm37587&quot; &quot;Gm37323&quot; &quot;Mrpl15&quot; &quot;Lypla1&quot; &quot;Tcea1&quot;
## [12] &quot;Rgs20&quot; &quot;Gm16041&quot; &quot;Atp6v1h&quot; &quot;Oprk1&quot; &quot;Npbwr1&quot; &quot;Rb1cc1&quot; &quot;4732440D04Rik&quot; &quot;Alkal1&quot; &quot;St18&quot;</code></pre>
<pre><code>## [1] &quot;Xkr4&quot; &quot;Gm1992&quot; &quot;Gm19938&quot; &quot;Gm37381&quot; &quot;Rp1&quot; &quot;Sox17&quot; &quot;Gm37587&quot; &quot;Gm37323&quot;
## [9] &quot;Mrpl15&quot; &quot;Lypla1&quot; &quot;Tcea1&quot; &quot;Rgs20&quot; &quot;Gm16041&quot; &quot;Atp6v1h&quot; &quot;Oprk1&quot; &quot;Npbwr1&quot;
## [17] &quot;Rb1cc1&quot; &quot;4732440D04Rik&quot; &quot;Alkal1&quot; &quot;St18&quot;</code></pre>
<p><br></p>
</div>
<div id="interactive-subsetting" class="section level3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ test_that("registeration non-rigid simpleitk", {
# check simpleitk installed
skip_if_not_installed("SimpleITK")

# TODO: for now skip on windows, GHA does not work but works on local windows ?
skip_on_os("windows")

# simpleitk
mapping_parameters_nonrigid$nonrigid <- "SimpleITK"

Expand Down
Loading