---
https://liulab-dfci.github.io/RIMA/index.html
https://github.com/liulab-dfci/RIMA_pipeline
Container definition file: https://github.com/pmitev/UPPMAX-Singularity/tree/main/RIMA
The pipeline setup is installed in a Singularity/Apptainer container with all required tools to run the complete workflow.
1. Transfer the Singularity container that is currently stored on Rackham1 at `rackham1.uppmax.uu.se:/tmp/RIMA.sif` to Bianca in the project folder `/crex/proj/PROJECT/RIMA` or so.
The container contains the git repository as well. To extract the repository outside the container run
```bash
# adapt the destination folder
singularity exec RIMA.sif cp -av /installs/RIMA_pipeline /crex/proj/PROJECT/RIMA/
```
Small fix for the [renamed program](https://github.com/liulab-dfci/RIMA_pipeline/commit/b8d93f0181e5660221564541415a5c6bb2ea6473) that is still called from `modules/microbiome/microbiome_cohort.snakefile:44: " && {params.path}; Rscript src/microbiome/mic_plot.R --input {output.merged_file}`
```bash
cd RIMA_pipeline/src/microbiome
ln -s microbiome_plot.R mic_plot.R
```
2. Start an interactive job with at least 8 CPUs (to reserve at least 64GB as mentioned in the manual).
```bash!
interactive -A sensXXXXX -n 16 -t 5-00:00
```
On the allocated node...
```bash
# adapt the location
cd /crex/proj/PROJECT/RIMA/RIMA_pipeline
singularity shell ../RIMA.sif
Singularity> source activate RIMA
(RIMA) Singularity> snakemake -s RIMA.snakefile -np
...
```
To run non interactively (example)
```bash
singularity exec RIMA.sif bash -c "source activate RIMA; snakemake -v; python -V "
5.5.4
Python 3.6.10 :: Anaconda, Inc.
```
## Singularity container definition file (*for reference only*)
https://github.com/pmitev/UPPMAX-Singularity/tree/main/RIMA
```singularity
Bootstrap: docker
From: condaforge/mambaforge
%environment
export LC_ALL=C
export PYTHONNOUSERSITE=True
%files
%post
export LC_ALL=C
export PYTHONNOUSERSITE=True
export CONDA_PKGS_DIRS=/tmp/mamba_pkgs_dir
mkdir -p ${CONDA_PKGS_DIRS}
apt-get update && apt-get install -y git libfontconfig1 libxrender1 libffi7
ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
mkdir -p /installs
cd /installs
git clone https://github.com/liulab-dfci/RIMA_pipeline.git
cd RIMA_pipeline
echo " - markdown==3.3.7" >> static/environment/GCP/rna.yml
echo " - requests==2.27.1" >> static/environment/GCP/rna.yml
echo " - Cython" >> static/environment/GCP/rna.yml
bash ./RIMA_environment.sh -p GCP
conda env list
# No need to clean = packages are kept otside in $CONDA_PKGS_DIRS
#conda clean --all --yes
%runscript
/bin/bash "$@"
```
## 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)