Skip to content

MPRAorg-LibrarySuite provides a comprehensive collection of software for analyzing and sharing MPRA data.

Notifications You must be signed in to change notification settings

MPRAhub/MPRAorg-LibrarySuite

Repository files navigation

GitHub issues BuildStatus-MPRAhub

MPRAorg-LibrarySuite

MPRAorg-LibrarySuite provides a comprehensive collection of libraries and tools for analyzing and sharing MPRA data.

Prerequistes & Installation

Before proceeding with the installation, please ensure that you have fulfilled making the following accounts:

  • GitHub: required to create & add their public ssh key.

  • Synapse: required to complete certification and create a Git issue to request addition to the Synapse project workspace.

  • Docker: (optionally) required to have a Docker account, which will enable you to pull the MPRAbase Docker image from the Synapse registry.

  • Singularity: (optionally) required to have a Synapse account if you are operating on a high performance compute cluster without root access.

For more information, please review our onboarding documentation for a smooth installation (link here).

Once you've completed the prerequiste accounts, please clone the MPRAorg-LibrarySuite repository:

git clone [email protected]:MPRAhub/MPRAorg-LibrarySuite.git
cd MPRAorg-LibrarySuite
bash build-MPRAhub.sh

Setup JupyterLab Workspace for MPRAhub

Local

To setup a JupyterLab workspace for MPRAhub, users can hit the ground running with the MPRAbase Docker container. We provide a Python executable called run-local-MPRAhub.py, which will launch a Docker container with user provided command line arguments. Here is an example:

cd MPRAorg-LibrarySuite
python3 run-local-MPRAhub.py --container_port 8888 --host_port 8888 \
--iSEE_MPRAbase_container_port 3838 --iSEE_MPRAbase_host_port 3838 \
--local_dir_mount /local/dir/path --image docker.synapse.org/syn51118207/mprabase:arm64-v0.1.1

High Performance Compute (HPC) cluster

For users on a High Performance Compute (HPC) cluster, we also provide a Singularity definition file and bash script called build-MPRAbhub-sif.sh to build the Singularity Image Format (SIF) file. We recommend using a Linux Screen session when building the MPRAhub.sif file, because the estimated build time is one hour.

cd MPRAorg-LibrarySuite/env
bash MPRAhub-build-sif.sh

We assume HPC users are required to ssh tunnel to a devolpment or compute node to launch an interactive Jupyter Lab workspace. Here's an example ssh tunnel command for UCSF's HPC where the user is running the Jupyter Lab workspace on dev1:

ssh [email protected] -J [email protected] \
-L <host port Jupyter Lab>:localhost:<container port Jupyter Lab> \
-L <host port iSEE MPRAbase>:localhost:<container port iSEE MPRAbase>

For a specific example for mprahub_user, we set 9797 as the local host port to access Jupyter Lab on a user's local web browser and 9595 as the container port to allow the user to access the Jupyter Lab workspace on the local host port. Finally, we set 3838 as the local host and container port to access an iSEE MPRAbase instance that was launched in the Jupyter Lab workspace.

ssh [email protected] -J [email protected] -L 9797:localhost:9595 -L 3838:localhost:3838

After users ssh tunnel into the HPC and build the MPRAhub SIF file, navigate to the MPRAorg-LibrarySuite (working) directory and launch the Jupyter Lab workspace using run-hpc-MPRAhub.py. Please note, the local directory mount for the Jupyter Lab workspace should be the full path to the MPRAorg-LibrarySuite (working) directory.

cd MPRAorg-LibrarySuite/
python3 run-hpc-MPRAhub.py  --container_port 9595 --local_dir_mount /local/path/to/MPRAorg-LibrarySuite \
--sif env/MPRAhub.sif

Install iSEE-MPRAbase Developer Dependencies

In a Jupyter Lab workspace running from the MPRAhub Singularity container, open a terminal and follow these commands to install our iSEEindex fork for launching iSEE-MPRAbase instances:

cd /home/jovyan/ # Assumes user launched a JupyterLab workspace using the Singularity MPRAbase SIF
Rscript build-iSEEindex-fork.R

After a successful iSEEindex installation, open the following Jupyter Notebook and execute all of the cells:

MPRAhub/MPRAbase/notebooks/demo-MRAbase-v0.1.1.ipynb 

Finally, paste the link in your browser search bar: http://0.0.0.0:3838/

Install MPRAbase Bioconductor Library for Developers

In the MPRAhub Singularity container running a JupyterLab workspace, open a terminal and follow these commands:

cd /home/jovyan/
Rscript build-MPRAbase-API.R

About

MPRAorg-LibrarySuite provides a comprehensive collection of software for analyzing and sharing MPRA data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published