cTRAP is an R package designed to compare differential gene expression results with those from known cellular perturbations (such as gene knock-down, overexpression or small molecules) derived from the Connectivity Map (Subramanian et al., Cell 2017). Such analyses allow not only to infer the molecular causes of the observed difference in gene expression but also to identify small molecules that could drive or revert specific transcriptomic alterations.



cTRAP is available in Bioconductor and can be installed with:

if (!requireNamespace("BiocManager", quietly = TRUE))


cTRAP can also be installed from GitHub instead:



The Docker images are based on Bioconductor Docker and contain cTRAP and its dependencies.

  1. Pull the latest Docker image:
docker pull ghcr.io/nuno-agostinho/ctrap:latest
  1. Start RStudio Web from the Docker image:
docker run -e PASSWORD=bioc -p 8787:8787 ghcr.io/nuno-agostinho/ctrap:latest
  1. Go to RStudio Web via your web browser at https://localhost:8787
  2. Login in RStudio Web with user rstudio and password bioc
  3. Load the package in RStudio Web using library(cTRAP)