# MRBIGR **Repository Path**: crazyhsu/MRBIGR ## Basic Information - **Project Name**: MRBIGR - **Description**: MRBIGR: Mendelian Randomization-Based Inference of Genetic Regulation - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-17 - **Last Updated**: 2024-11-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MRBIGR: Mendelian Randomization-Based Inference of Genetic Regulation MRBIGR is a multifunctional toolkit for pre-GWAS, GWAS and post-GWAS of both traditional and multi-omics data. MRBIGR provides all the components needed to build a complete GWAS pipeline, and integrates with rich post-GWAS analysis tools such as significantly associated locus (SAL) annotation and haplotype analysis. In particular, Mendelian randomization (MR) analysis, MR-based network construction, module identification and gene ontology analysis are proposed for further genetic regulation studies. Additionally, it also produces rich plots for visualization of the analysis results and other formatted data. ![MRBIGR](imgs/MRBIGR.png) ## Installation ### Installation using [docker](https://docs.docker.com/engine/install/) (recommended) ```bash git clone https://gitee.com/crazyhsu/MRBIGR.git cd MRBIGR docker build -t mrbigr_image . curr_dir=$(pwd) docker run -dit --name mrbigr_env -p 3838:3838 \ -v $curr_dir/MRBIGR_data:/root/MRBIGR/MRBIGR_data \ -v $curr_dir/MRBIGR_output:/root/MRBIGR/MRBIGR_output \ -v $curr_dir/MRBIGR_log:/root/MRBIGR/MRBIGR_log \ -e SHINY_INPUT_PATH=/root/MRBIGR/MRBIGR_data \ -e SHINY_OUTPUT_PATH=/root/MRBIGR/MRBIGR_output \ -e SHINY_LOG_PATH=/root/MRBIGR/MRBIGR_log \ -e SHINY_ROOT_PATH=/root/MRBIGR \ mrbigr_image:latest ``` If no exception is thrown out, please enter the `http://localhost:3838` in the browser and then you will see the following interface: ![MRBIGR GUI](imgs/MRBIGR_GUI_portal.jpg) __Note__: If you encounter the issue like ``` #0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.10kB done #1 DONE 0.2s #2 [internal] load metadata for docker.io/crazyhsu/mrbigr_env:v1.2 #2 ERROR: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Acrazyhsu%2Fmrbigr_env%3Apull&service=registry.docker.io": dial tcp [2a03:2880:f130:83:face:b00c:0:25de]:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ------ > [internal] load metadata for docker.io/crazyhsu/mrbigr_env:v1.2: ------ Dockerfile:1 -------------------- 1 | >>> FROM crazyhsu/mrbigr_env:v1.2 2 | 3 | ENV CONDA_DEFAULT_ENV=mrbigr -------------------- ERROR: failed to solve: crazyhsu/mrbigr_env:v1.2: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Acrazyhsu%2Fmrbigr_env%3Apull&service=registry.docker.io": dial tcp [2a03:2880:f130:83:face:b00c:0:25de]:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ``` Please try the following code: ```bash git clone https://gitee.com/crazyhsu/MRBIGR.git cd MRBIGR docker pull crazyhsu/mrbigr_env:v1.2 # direct pull the images without authorize docker build -t mrbigr_image . # or wget https://zenodo.org/records/13955396/files/mrbigr_env_v1.2.tar docker load -i mrbigr_env_v1.2.tar docker build -t mrbigr_image . ``` Then run the docker container: ```bash curr_dir=$(pwd) docker run -dit --name mrbigr_env -p 3838:3838 \ -v $curr_dir/MRBIGR_data:/root/MRBIGR/MRBIGR_data \ -v $curr_dir/MRBIGR_output/demo:/root/MRBIGR/MRBIGR_output/demo \ -v $curr_dir/MRBIGR_log:/root/MRBIGR/MRBIGR_log \ -e SHINY_INPUT_PATH=/root/MRBIGR/MRBIGR_data \ -e SHINY_OUTPUT_PATH=/root/MRBIGR/MRBIGR_output/demo \ -e SHINY_LOG_PATH=/root/MRBIGR/MRBIGR_log \ -e SHINY_ROOT_PATH=/root/MRBIGR \ mrbigr_image:latest ``` ### Installation using conda ``` git clone https://gitee.com/crazyhsu/MRBIGR.git cd MRBIGR conda create -n mrbigr python=3.7 -y conda activate mrbigr python setup.py build python setup.py install pip install pyranges conda install -y -c conda-forge r-rcppeigen r-xml r-rsqlite r-europepmc r=3.6 rpy2 vcftools Rscript -e 'install.packages(c("data.table", "ggplot2", "ggsignif", "ggrepel","Matrix", "igraph", "network", "GGally", "sna","tidyr","ggraph","lme4","ggpubr","pheatmap","factoextra", "R.utils"), repos="https://cloud.r-project.org")' Rscript -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager", repos="https://cloud.r-project.org");BiocManager::install(c("AnnotationForge","clusterProfiler","ggtree"))' Rscript -e 'install.packages("bigsnpr", dependence=T, repos="https://cloud.r-project.org")' Rscript -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/FactoMineR/FactoMineR_1.42.tar.gz", repos=NULL)' echo "export PATH=`pwd`/utils:\$PATH" >> ~/.bashrc echo "export LD_LIBRARY_PATH=`pwd`/utils/libs:\$LD_LIBRARY_PATH" >> ~/.bashrc source ~/.bashrc Rscript -e "install.packages(c('shiny','bslib','shinyFiles','shinyalert'), repos='https://mirrors.tuna.tsinghua.edu.cn/CRAN/')" Rscript -e "shiny::runApp('MRBIGR-I/app.R', host = '0.0.0.0', port = 3838)" ``` ## Usage ![MRBIGR-workflow](imgs/MRBIGR-workflow.png) The workflow of MRBIGR is illustrated in above. MRBIGR begins with **①** genotypic and phenotypic data, which undergo preprocessing steps in **②** genotypic and **③** phenotypic data process modules, such as quality control, format conversion, and multidimensional analysis, etc.. **④** Genome-wide association studies (GWAS) are then performed, **⑤** followed by Mendelian randomization (MR) to infer causal relationships. **⑥** An MR-based network is subsequently constructed, and **⑦** Gene Ontology (GO) analysis is used to explore functional characteristics. Finally, **⑧** various visualization tools, including Manhattan plots, heatmaps, and network diagrams, are employed to present the results, providing comprehensive support for multi-omics data exploration and analysis. Before using MRBIGR, you can read the [data preparation file](data_preparation.md) to understand the data types supported by MRBIGR and how to use MRBIGR for format conversion. To reproduce the images in the MRBIGR paper, you can follow the instruments in [`reproduce/maize.sh`](reproduce/maize.sh) or [`reproduce/rice.sh`](reproduce/rice.sh). You can also refer to the [online website](https://mrbigr.github.io) for more usage about MRBIGR. ## Contact Any question please open a [issue](https://gitee.com/crazyhsu/MRBIGR/issues) or contact Feng Xu (xufeng9527(at)cau.edu.cn).