Coder Social home page Coder Social logo

javimangal / preoperative-atelectasis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 29.7 MB

This repository contains the documentation for reproducibility of the study "Preoperative atelectasis in patients with obesity undergoing bariatric surgery: a cross-sectional study".

License: MIT License

R 100.00%
anesthesia anesthesiology atelectasis mediation-analysis obesity perioperative-medicine

preoperative-atelectasis's Introduction


PABA logo

Repository DOI Dataverse Preprint DOI

Description

This repository contains the documentation for reproducibility of the study "Preoperative atelectasis in patients with obesity undergoing bariatric surgery: a cross-sectional study". The linked dataset for this study can be found in the Harvard Dataverse. The first version of this manuscript was made available as a preprint in medRxiv, and both the replication data (v1) and code (v1) for that manuscript are cited within the preprint. The current status of the repository is reflective of the manuscript that is undergoing peer review in an international journal and will be deposited in zenodo as v2 upon publication of the peer-reviewed article.

Getting started

In order to replicate these analyses, I suggest that the user follows these steps:

  1. Install R and RStudio on your computer if you haven't done so. (Note that these analyses were conducted under R version 4.3.3 and RStudio 2023.12.1).
  2. Clone this repository. If you do not know how to do this, you can follow these instructions. Alternatively, you can go to zenodo and download the ZIP file, unpack it, and place it in a folder in your computer.
  3. You should now have all these files in your computer with an identical folder structure (described in the following section).
  4. In the main directory, open the file named preoperative_atelectasis.Rproj in RStudio.
  5. You can navigate through the folders on the right-bottom panel of R Studio. Open the R folder. You should now see a series of files starting with Part_ and ending with .qmd.
  6. Open one of these files. You can run every chunk of code sequentially to reproduce the analyses. Make sure to respect the order and if something fails, I recommend that you start running al chunks of code from the beginning. If you don't know how to run a chunk of code, you can imitate what this person is doing. If you get a message saying "Access denied", change from Visual to Source mode which can be done with the Ctrl+Shift+F4 command.

I recommend that the .qmd files are opened and ran in sequential order, although some may only be interested in one of the parts of the analyses. If you are not able to follow the prior steps, you may also consider reviewing the PDF reports documenting the analyses. The sequence of these files is as follows:

  • Part 1. Application of selection criteria and assessment of missing data. PDF
  • Part 2. Descriptive analyses. PDF
  • Part 3. Assessment of relationships between independent variables. PDF
  • Part 4. Assessment of outcomes. PDF
  • Part 5. Statistical modelling: Atelectasis. PDF
  • Part 6. Mediation analysis of the effect of BMI on SpO2, mediated through atelectasis. PDF
  • Part 7. Posthoc analyses. PDF
  • Part 8. Mediation analysis of the effect of BMI on SpO2, mediated through atelectasis, distinguishing between high and low SpO2 values. PDF

Although I have made significant efforts to ensure reproducibility of this project, I encourage you to contact me or post a request in this repository in case you encounter any issues.

Project Structure

The project structure distinguishes three kinds of folders:

  • read-only (RO): not edited by either code or researcher
  • human-writeable (HW): edited by the researcher only.
  • project-generated (PG): folders generated when running the code; these folders can be deleted or emptied and will be completely reconstituted as the project is run.
.
├── .gitignore
├── CITATION.cff
├── LICENSE
├── README.md
├── preoperative_atelectasis.Rproj
├── data                  <- All project data files
│   ├── processed         <- The final, canonical data sets for modeling. (PG)
│   ├── raw               <- The original, immutable data. (RO)
│   └── temp              <- Intermediate data that has been transformed. (PG)
├── docs                  <- Documentation for users (HW)
│   ├── manuscript        <- Manuscript source, docx. (HW)
│   ├── reports           <- Project reports, pdf. (HW)
│   └── DAG               <- Directed Acyclic Graph documentation, txt. (HG)
├── results
│   ├── output_figures    <- Figures for the manuscript or reports (PG)
│   └── output_tables     <- Output tables for the manuscript (PG)
└── R                     <- Source code for this project (HW)
│   ├── scripts           <- Scripts sourced in main R markdown documents (PG)
│   └── sessions          <- Text files with information of R sessions (PG)
└── renv                  <- Packaging dependencies (RO)

Documentation

The full documentation with comments of statistical analyses can be found in the reports folder. Each PDF file documents sequential parts of the analyses, identified as Part 1 to Part 8 files as mentioned before. These reports describe the operating system of R and package versions dependencies to reproduce each part of the analyses. I have also included package dependencies in the renv folder in a lockfile.

License

This project is licensed under the terms of the MIT License.

This project structure template repository is adapted from the Good Enough Project Cookiecutter template by Barbara Vreede (2019).

preoperative-atelectasis's People

Contributors

javimangal avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

trangtph

preoperative-atelectasis's Issues

Part 1 is reproducible (with some help of ChatGPT), part 2 not

1. What project did you reproduce (include the link!)?

-> this one

2. Does the project have the following on its Github repository:

  • A Readme with information about the project
  • A license
  • Citation information
  • Requirements for running the code (dependencies)
  • An understandable folder structure

3. What did you appreciate about the project's repository?

->

4. Do you have any suggestions for improvement to the repo?

-> What do I need to run exactly? Not so familar with R so can't make sense of which file
-> says sth on how to install dependencies
-> first data was not there
-> error in package : rnaturalearthhires
-> Error in value[3L] :
Failed to install the rnaturalearthhires package.
Please try installing the package for yourself using the following command:
devtools::install_github("ropensci/rnaturalearthhires")

-> also an error with kaleido scope
5. Did you manage to run the project successfully?

  • Yes
  • Largely (Part 1 yes, part 2 no)
  • No
  • Other:

6. What went right?

-> i could find the run button

7. What did you need to adjust for the project to (try to) run?

  • I had to install dependencies that were clearly indicated in the requirements/readme
  • I had to install dependencies that were not indicated anywhere
  • I had to change the code in some places
  • Other:

8. Where did you have to give up reproducing this repo (if applicable)?

->

9. Did you have to go into the code?

  • Yes
  • No
  • I didn't have to, but I had time left/was intrigued, so I did it anyway!

10. If you looked at the code: what did you like?

-> it was clear for me what was the error, the data, and secondly installing the package, and i asked ChatGPT to help me out

11. If you looked at the code, what would be a single line of advice you want to pass on to its author:

->

12. Any final comments to the author:

->

11. Do you think the class will benefit from a live demo of the reproduction of this project? Why/what can we learn?

->


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.