Skip to content

Commit

Permalink
Version used for manuscript
Browse files Browse the repository at this point in the history
  • Loading branch information
burlab committed Mar 1, 2019
0 parents commit 9656836
Show file tree
Hide file tree
Showing 171 changed files with 4,635 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### -- Packrat Autoloader (version 0.5.0-5) -- ####
source("packrat/init.R")
#### -- End Packrat Autoloader -- ####
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
packrat/lib*/
analysis/Sieber-Ruckstuhl_Burla_2019_StatisticsFigures_cache/
.Rproj.user
.Rhistory

# History files
.Rhistory
.Rapp.history

# Session Data files
.RData

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
/*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Singapore Lipidomics Incubator (SLING)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions Manuscript_Sieber-Ruckstuhl_Burla_2019.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
274 changes: 274 additions & 0 deletions README.html

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Data Analysis for the Manuscript *'Changes in the Canine Plasma Lipidome after Short- and Long-Term Excess Glucocorticoid Exposure'*
Authors: *Nadja S. Sieber-Ruckstuhl, Bo Burla, Susanne Spoerel, Florence Schmid, Claudio Venzin, Amaury Cazenave-Gassiot, Anne K. Bendt, Federico Torta, Markus R. Wenk, Felicitas S. Boretti* (Affiliations: *University of Zurich, Switzerland, and National University of Singapore*)

This repository containes the R scripts used to process the lipidomics raw data, to perform the statistical analyses and to generate all figures and tables of the manuscript. The code for the statistical analyses and figures is provided as a R Notebook with a packrat libary to faciliate reprodubility of the data analysis.

## Getting the Code
All R code and datasets are provided as an [RStudio](https://www.rstudio.com/products/RStudio) project. The easiest way to download and run this code is to clone this repository within RStudio. In RStudio, select "New Project" from the "File" menu, then choose "Version Control" followed by "Git". Add the URL of this GitHub repository (https://github.com/SLINGhub/Manuscript_Sieber-Ruckstuhl_Burla_2019.git) and choose a local name and path. Alternatively, you can also download the Github Repository and open the Rstudio project.

## Setting up the Code
By default, the dependencies for this project are managed using [packrat](https://rstudio.github.io/packrat/) to improve reproducibility and facilitate installation of required packages. After cloning, the required packages can be automatically installed by typing following command in the console:
```r
packrat::restore()
```
You may need to restart the R session to activate packrat. Please note that downloading and installation of the packages may take a while depending on your system and the local packrat library will use around ~500 MB of storage.

Should you prefer to use your local R library instead, you can turn packrat off via following command:
```r
packrat::off()
```
In this case please make sure that you have all required packages installed. The package [ComplexHeatmap](https://github.com/jokergoo/ComplexHeatmap) is required in Version 1.99 or higher, which could be obtained at the time of writing via:
```r
library(devtools)
install_github("jokergoo/ComplexHeatmap")
```

## Directory Structure
* `analysis/` Contains the R Notebook and R scripts. The HTML report generated from the R Notebook (`Sieber-Ruckstuhl_Burla_2019_StatisticsFigures.Rmd`) is also saved in this folder.
* `data/`
* `raw/` Contains the original dataset (`Sieber-Ruckstuhl_Burla_2019_RawData-Annot.xlsx`) with peak areas from MS analyses, clininical chemistry results and all annotations.
* `processed/` Contains a precomputed version of the processed dataset (`Ruckstuhl-Sieber_Burla_2019_LipidConc_uM_TableS1.csv`).
* `output/` Contains the figures as PDF and tables as CSV generated by the scipts in the R notebook
* `packrat/` Contains local packages of the project and other packrat related files

## Running the Analysis
* Open the R Notebook `Sieber-Ruckstuhl_Burla_2019_StatisticsFigures.Rmd` (in the `Analysis` folder)
* Run the first and second chunks (Init and LoadProcessData). This will call the R scripts in `ms_data_postprocessing.R` to load and process the mass spectrometry raw data, resulting in the file `Ruckstuhl_Burla_2019_LipidConc_uM.csv`. By default this CSV file is then imported and the data is prepared to be used in chunks that generate the figures.
* Run the all or selected subsequent chunks to generate figures. The figures are then shown within the Notebook and additionally stored as PDF files in the folder `output`

* To create a report, click "Knit" in the RStudio user interface, this will by default generate a HTML document.

For the publication, figures were imported as PDF files into Adobe Illustrator to adjust arrangements, dimensions, line widths and annotations.

## Contact
* Code and Data Analysis: *Bo Burla* (lsibjb@nus.edu.sg) or submit a Github Issue/Pull request
* Manuscript: *Federico Torta* (bchfdtt@nus.edu.sg) and *Felicitas Boretti* (fboretti@vetclinics.uzh.ch)


License
----
The code in this analysis is covered by the `MIT` license

Loading

0 comments on commit 9656836

Please sign in to comment.