Skip to content
Snippets Groups Projects

High-Throughput RNA-seq model fit

Why use HTRfit

HTRfit provides a robust statistical framework that allows you to investigate the essential experimental parameters influencing your ability to detect expression changes. Whether you're examining sequencing depth, the number of replicates, or other critical factors, HTRfit's computational simulation is your go-to solution.

Furthermore, by enabling the inclusion of fixed effects, mixed effects, and interactions in your RNAseq data analysis, HTRfit provides the flexibility needed to conduct your differential expression analysis effectively. HTRfit is particularly adapted for the analysis of large number of samples, or highly multiplexed experiments.

Installation

method A:

To install the latest version of HTRfit, run the following in your R console :

if (!requireNamespace("remotes", quietly = TRUE))
    install.packages("remotes")
remotes::install_git("https://gitbio.ens-lyon.fr/aduvermy/HTRfit")

method B:

You also have the option to download a release directly from the HTRfit release page. Once you've downloaded the release, simply launch following command.

## -- Example using the HTRfit-v2.0.0 release
install.packages('HTRfit-v2.0.0.tar.gz', repos = NULL, type='source')

When dependencies are met, installation should take a few minutes.

CRAN packages dependencies

The following depandencies are required:

## -- required
install.packages(c('parallel', 'data.table', 'ggplot2', 'gridExtra', 
                    'glmmTMB', 'magrittr', 'MASS', 'reshape2', 
                    'rlang', 'stats', 'utils', 'BiocManager', 'car'))
BiocManager::install('S4Vectors', update = FALSE)
## -- optional 
BiocManager::install('DESeq2', update = FALSE)

Docker

We have developed Docker images to simplify the package's utilization.

docker pull ruanad/htrfit:v2.0.0-beta
docker run -it --rm ruanad/htrfit:v2.0.0-beta

HTRfit allows building graphs to visualize results. Inside Docker, displaying a window from the R terminal can be tricky and requires specific settings before running the container. Following commands worked for us:

# Prepare target env
CONTAINER_DISPLAY="0"
CONTAINER_HOSTNAME="htrfit_user"
# Create a directory for the socket
mkdir -p display/socket
touch display/Xauthority
# Get the DISPLAY slot
DISPLAY_NUMBER=$(echo $DISPLAY | cut -d. -f1 | cut -d: -f2)
# Extract current authentication cookie
AUTH_COOKIE=$(xauth list | grep "^$(hostname)/unix:${DISPLAY_NUMBER} " | awk '{print $3}')
# Create the new X Authority file
xauth -f display/Xauthority add ${CONTAINER_HOSTNAME}/unix:${CONTAINER_DISPLAY} MIT-MAGIC-COOKIE-1 ${AUTH_COOKIE}
# Proxy with the :0 DISPLAY
socat UNIX-LISTEN:display/socket/X${CONTAINER_DISPLAY},fork TCP4:localhost:60${DISPLAY_NUMBER} &
# Launch the container
docker run -it --rm \
  -e DISPLAY=:${CONTAINER_DISPLAY} \
  -e XAUTHORITY=/tmp/.Xauthority \
  -v ${PWD}/display/socket:/tmp/.X11-unix \
  -v ${PWD}/display/Xauthority:/tmp/.Xauthority \
  --hostname ${CONTAINER_HOSTNAME} \
  ruanad/htrfit:v2.0.0-beta
## inspired by : https://blog.yadutaf.fr/2017/09/10/running-a-graphical-app-in-a-docker-container-on-a-remote-server/

Biosphere virtual machine

A straightforward way to use HTRfit is to run it on a Virtual Machine (VM) through Biosphere. We recommend utilizing a VM that includes RStudio for an integrated development environment (IDE) experience. Biosphere VM resources can also be scaled according to your simulation needs.
HTRfit can be installed using the method A.

Getting started