Skip to content

How to Install JBQR

JBQR is currently hosted on GitHub. You can find the repository here

To install JBQR, you can use the install_github function from the devtools library.

Install and load library

# Install devtools package if not already installed
install.packages("devtools")

# Load devtools package
library("devtools")

Install JBQR

install_github("TheJacksonLaboratory/bioconnect-jbqr", force = TRUE)
library("jbqr")
This will install JBQR and make it ready for use in your R environment.

Verify Installation

jbq_obj <- JBQ$new()
jbq_obj$get_version()
should output
[1] "0.0.1"

Test with a Sample Data Package

Download the sample data package JAXDP00006X.zip and save it to a directory of your choice. Start an interactive R session in the same folder as the zip file

jbq_obj <- JBQ$new('JAXDP00006X.zip')
study_sources <- jbq_obj$get_study_sources()
study_sources
should output
> study_sources
                            source_name bedding date.of.birth date.of.death            diet diet.start.date    sex
1  JMUS003afd07e626d471dc146e713eccd881      NA    11/03/2020    02/15/2021 44% fat + fiber      12/16/2020 female
2  JMUS052350f269e772f16a5ebd42231f87bf      NA    11/10/2020    02/23/2021 44% fat + fiber      12/23/2020   male
3  JMUS0c58dc438c52346c4c8302a027d9f12e      NA    11/10/2020    02/22/2021 10% fat + fiber      12/23/2020   male
4  JMUS0c95880aca8e16b158baaca6df39c6e0      NA    11/10/2020    02/22/2021 10% fat + fiber      12/23/2020 female
5  JMUS172822be3046d1938faa1d85d10e9681      NA    11/10/2020    02/23/2021 44% fat + fiber      12/23/2020   male
......

R Environment Set Up on Unix summer2

(need more work, to handle the both use cases on sumner2)

Robyn's note for useing R on sumner:

for an interactive R session, specify the memory and time. Here I specified 48 hrs and 128GB. Then, call a .sif -- I'm sure I have one you can access but there are a lot floating around. If you need a package not in the sif, open an interactive R session and use install.packages("packagename")

srun -p compute -q batch --mem=128g -t 48:00:00 -c 1 --pty $SHELL
module load singularity
singularity exec /projects/chesler-lab/sifs/rstudio.4.0.3_v1.2.simg R

for rstudio (I'm no expert) but this is one option...

Login into Sumner2:
ssh login.sumner2.jax.org
 [yanicr@sumner-log4 ~]$ module avail

Load the module:
[yanicr@sumner-log4 ~]$ module load rstudio
***Rstudio 4.3.1 loaded. Use the command 'rstudio-session-4.3.1' to start a new session.
To view the help guide and learn how you can request more resources, use the -h or --help flag:
[yanicr@sumner-log4 ~]$ rstudio-session-4.3.1 --help
Usage: rstudio-session-4.3.1 [OPTIONS...]
Option Description
 -h    print this message
 -m    amount of real memory
 -c    number of cpus required
 -y    don't ask for confirmation
Begin a session by running the rstudio-session-4.3.1 command.  If you run rstudio-session-4.3.1 binary without any arguments, the resulting session will have 2 cpus and 8G of memory by default.

# download R singularity image
wget http://jaxreg.s3-ct.jax.org/rnaseq-modelad/R-sha256.5c905c3cabec2f5787eabb4832f13e1cdb1120f282514ac8f6cf03a29fdc3df1.sif -O R_4_0.sif


srun -p compute -q batch --mem=128g -t 48:00:00 -c 1 --pty $SHELL
module load singularity
singularity exec R_4_0.sif R