Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
## Description This repository includes data and code used in the paper Sié et al. (2024) Azithromycin during Routine Well-Infant Visits to Prevent Death. _New England Journal of Medicine_ 390:221-229 https://www.nejm.org/doi/full/10.1056/NEJMoa2309495 The paper reports the primary analysis of the CHATON trial in Burkina Faso ([NCT03676764](https://clinicaltrials.gov/study/NCT03676764)). De-identified individual level data required to run all analyses are provided in the `data` component. R code is provided in the `code` component, and HTML output files from the analysis are provided in the `analysis output` component. Note that the `code` component is linked with GitHub to mirror (and archive w/ DOI) this this public repository, which might be useful (e.g., to run R Studio server using the provided Docker container — see instructions below). Should you have any questions about the materials in this repository, please contact Ben Arnold at UCSF (ben.arnold@ucsf.edu). ## Software Information Following: https://www.nature.com/documents/nr-software-policy.pdf ### System Requirements All analyses were run using R software version 4.3.2 on macOS Monterey using the RStudio IDE (https://www.rstudio.com). `> sessionInfo()` `R version 4.3.2 (2023-10-31)` `Platform: aarch64-apple-darwin20 (64-bit)` `Running under: macOS Monterey 12.6` The repository includes a Docker container and have used the `renv` package to archive the package versions so that you and reproduce the exact compute environment on an instance of R Studio Server, should you wish to do so. ### Installation Guide and Instructions for Use (Desktop) You can download and install R from CRAN: https://cran.r-project.org You can download and install RStudio from their website: https://www.rstudio.com All R packages required to run the analyses are sourced in the file `0-CHATON-primary-Config.R`. The installation time should be < 10 minutes total on a typical desktop computer. To reproduce all analyses in the paper, we recommend that you: 1. Clone the GitHub repository to your computer For example, in the location on your computer where you would like to clone the repository, you could type into the Terminal command: `git clone https://github.com/proctor-ucsf/CHATON-primary.git` 2. Recreate the exact package environment using the `renv` package. You can do this by opening the R project file ([CHATON-primary.Rproj](https://github.com/proctor-ucsf/CHATON-primary/blob/main/CHATON-primary.Rproj)) in RStudio, loading the `renv` package, and typing `renv::restore()` to restore the package environment from the projects [renv.lock](https://github.com/proctor-ucsf/CHATON-primary/blob/main/renv.lock) file. 3. All of the analysis scripts should run smoothly (scripts `1-xx.Rmd` to `11-xx.Rmd`) EXCEPT for `8-CHATON-Trial-Population.Rmd`, which does a quick comparison of population characteristics with the sister trial named CHAT, and relies on a child ID link that is not based on the public IDs. All other scripts will run smoothly. They will save HTML file output in the /output directory. ### Installation Guide and Instructions for Use (Docker / RStudio Server) The repository includes a `Dockerfile` and archive of package versions in the `renv.lock` file that you can use to build a Docker image and then launch a container on RStudio Server. You can download and install Docker from: https://docs.docker.com/get-docker/ For MacOS users, we also recommend installing Homebrew to ensure git and docker work smoothly: https://docs.brew.sh/Installation After installing Docker and (optionally) homebrew, follow these steps: 1. Clone the GitHub repository to your computer, from the Terminal command line: `git clone https://github.com/proctor-ucsf/CHATON-primary.git` 2. Build a Docker Image from the repository. For example, to create an image with the same name as the repository (but docker requires lowercase names), from the Terminal command line: `docker build --tag chaton-primary CHATON-primary/` This will take about 25 minutes to build the image because it needs to download and install R and all of the relevant package libraries. 3. Launch an instance of the image on RStudio Server There are many ways to do this, but one example of this, from the Terminal command line: `docker run -e USER=myname -e PASSWORD=mypass --rm -p 8787:8787 -v /Users/benarnold/CHATON-primary:/home/myname chaton-primary` This launches the container and passes (arbitrary) credentials to RStudio Server. In this example, the Username is `myname` and the Password is `mypass`. These could be anything you like -- you will just need to use them when you open your browser to access RStudio Server (next step) 4. Navigate to your web browser and go to: `http://localhost:8787`, then enter the USER and PASSWORD specified in the last step to access RStudio Server. 5. You can then run RStudio and the analysis files in a virtual instance of RStudio Server, just as you normally would on your desktop. Analyses will be run on the remote server using Linux-Ubuntu. All of the analysis scripts should run smoothly (scripts `1-xx.Rmd` to `11-xx.Rmd`) EXCEPT for `8-CHATON-Trial-Population.Rmd`, which does a quick comparison of population characteristics with the sister trial named CHAT, and relies on a child ID link that is not based on the public IDs. All other scripts will run smoothly. They will save HTML file output in the `/output` directory. NOTE: we have not tested the above steps on a Windows or Linux desktop operating system (only macOS Intel processors), but they should work similarly. We have not had a successful image build on Apple silicon processors for reasons that seem to be above the pay grade of an academic epidemiologist. If we figure it out, we will update the Dockerfile. ### Additional details You can run the `.Rmd` notebook scripts one-by-one or you can compile [`CHATON-primary-run-all.R`](https://github.com/proctor-ucsf/CHATON-primary/blob/main/R/CHATON-primary-run-all.R), which is the file we used to run the final analyses (e.g., from the command line `R CMD BATCH CHATON-primary-run-all.R &`). The analyses on the above Mac desktop configuration with 8 cores required 13 minutes to run. Running the analysis on RStudio Server required 2 hours 36 minutes to complete. ### License This project is covered by the CC0 1.0 Universal license.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.