R scripts/data for Lucaciu & Constantine-Cooke et al. Real-world experience with tofacitinib in ulcerative colitis - a systematic review and meta-analysis of observational studies. The scripts have been written by Nathan Constantine-Cooke and are licensed under the MIT license.
R scripts can be found in the R/
directory.
analysis.R
is the primary R script for performing the analysis.
functions.R
contains the MetaAnalysis
function used to perform the analysis.
This file does not need to be loaded separately, as this function will be loaded
when analysis.R
is run.
The data used for this analysis can be found in the data/
directory.
efficacy.csv
and safety.csv
contain the data used for the pooled analysis of
efficacy and safety respectively. Metadata for these files can be found below
in the dedicated section of this file.
Assuming R is already installed, this analysis
can be run either conventionally (using the Rscript
terminal
command or Rstudio IDE), or via a Docker container. The former is easier to use
and more conventional to those familiar to R, whilst the latter is optimal for
reproducibility. Docker uses an image of the environment used to produce the
analysis and will , in theory, reproduce the same output many years into the future
regardless of changes to operating systems or the R programming language.
If taking the conventional approach, the analysis can be run in just three lines from a bash/zsh terminal.
git clone https://github.com/nathansam/tofameta
cd tofameta
Rscript R/analysis.R
You can now find the generated plots and csv files in the output/
folder
within the tofameta/
directory.
For those adverse to using git, you may prefer to download the source code from
the releases page, unzip the
source code and then run the analysis.R
script in the R/
folder. Please note
that your working directory will need to be the top-level directory of
tofameta
.
If Docker is not already installed, then first
install Docker. Running the below script
in a bash/zsh terminal will pull the tofameta
image from GitHub's servers,
rename the image to a much nicer name than the format GitHub insists on, and
run the analysis. Note that in order to save the output outside of the container,
a volume must be specified using -v
. Simply replace <OUTPUTdirectory> in the
below script with a path to where you wish the output to be saved.
# Pull image
docker pull ghcr.io/nathansam/tofameta/tofameta:v1.0
# Rename to a nicer tag
docker tag ghcr.io/nathansam/tofameta/tofameta:v1.0 nathansam/tofameta
# Delete the old tag
docker rmi ghcr.io/nathansam/tofameta/tofameta:v1.0
# Run the docker image
docker run -v <OutputDirectory>:/analysis/output nathansam/tofameta
Replacing <OutputDirectory> with the path to a directory you wish to store the
output from the script in (such as ~/output
).
If you wish to delete the image (around 1.09GB in size) after the analysis has finished then run
docker rmi -f nathansam/tofameta
This section provides descriptions of each of the columns in each data file.
Year
: Year study was publishedAuthor
: First author of studyni
: Participants in the studyUC
: Participants with ulcerative colitis.earlyResp
: Clinical response during the induction phaselateResp
: Clinical response during the maintenance phaseearlyRem
: Clinical remission during the induction phaselateRem
: Clinical remission during the maintenance phaseearlySFrem
: Steroid free clinical remission during the induction phaselateSFrem24
: Steroid free clinical remission during the maintenance phaseendorem
: Endoscopic remission at any time pointCD
: Participants with Crohn's diseaseIBDU
: Participants with inflammatory bowel disease unclassifiedearlyTot
: Participants in study during induction phaselateTot
: Participants in study during maintenance phaseantiTNF
: AntiTNF medication prior to joining study.vedo
: Vedolizumab medication prior to joining studyuste
: Ustekinumab medication prior to joining studynoBio
: No biological medication prior to joining study (bio naive)endoTot
: Underwent endoscopyage
: Median age of patients in the study
Year
: Year study was publishedAuthor
: First author of studyni
: Participants in the studyFollowup
: Median followup for the studyAE
: Experienced an adverse eventHZ
: Developed herpes zosterDyslipidemia
: Developed dyslipidemiamalignancy
: Developed malignancyColectomy
: Underwent colectomyPNR
Primary non-responseLOR
Loss of responseInfectionM
: Mild/moderate infectionInfectionS
: Severe infectiondiscont
: Treatment discontinuation at any time pointdiscontAE
: Treatment discontinued due to adverse eventdiscontColectomy
: Treatment discontinued due to colectomydiscontPNR
: Treatment discontinued due to primary non-responsediscontLOR
: Treatment discontinued due to loss of responsediscontPatient
: Treatment discontinued due to primary non-response