# R.ROSSETTA - Singularity container
https://komorowskilab.github.io/R.ROSETTA/tutorials.html#installation
## To run on Bianca
> The instructions to run anywhere else should be the same, except that when Internet is available, wine could work without installing `wine-mono`.
```bash
# Get a shell in the container environment
singularity shell /sw/apps/pm-tools/latest/rackham/singularity/R.ROSETTA/rosetta.sif
# On Bianca, Wine struggles to run without .NET which is not a problem if there is an Internet
# Run once =========
# remove any old wine installation
rm -rf ~/.wine
wine msiexec /i /opt/wine-mono-7.4.0-x86.msi
# wait until you see lines like this - it will hang...
# 002c:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
# 0040:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@wineusb.sys,-1" -> L"C:\\windows\\inf\\wineusb.inf"
# CTRL+C to kill the proccess - it should be ready
# One can skip the above wine-mono installation next time
# Start R from inside the container - no need to load modules!
R
...
> library(R.ROSETTA); rosetta(autcon)
...
192 1.000000e+00 3.121951 1.000000e+00 0.358:27.255
193 1.000000e+00 10.250000 9.790282e-01 1.316:79.859
$quality
accuracyMean accuracyMedian accuracyStd accuracyMin accuracyMax
0.804242 0.8 0.082063 0.666667 0.933333
```
## To run from a SBATCH script
```bash
#!/bin/bash -l
#SBATCH ...
singularity exec /sw/apps/pm-tools/latest/rackham/singularity/R.ROSETTA/rosetta.sif Rscript program.r
```
## To build the container
https://github.com/pmitev/UPPMAX-Singularity/tree/main/R.ROSETTA
```bash
# Download the definition file
wget https://github.com/pmitev/UPPMAX-Singularity/raw/main/R.ROSETTA/rosetta.def
# Build the container. On rackham run without sudo
sudo singularity build rosetta.sif rosetta.def
```
## Fix for wine on Bianca without the container
```bash=
wine msiexec /i /sw/apps/pm-tools/latest/rackham/singularity/R.ROSETTA/wine-mono-7.4.0-x86.msi
```
## Contacts:
- [Pavlin Mitev](https://katalog.uu.se/profile/?id=N3-1425)
- [UPPMAX](https://www.uppmax.uu.se/)
- [AE@UPPMAX - related documentation](/8sqXISVRRquPDSw9o1DizQ)
![](https://live.webb.uu.se/digitalAssets/207/c_207717-l_3-k_bg-city.png)
###### tags: `UPPMAX` `RT-288073`