Giter Club home page Giter Club logo

ocr-stats's Introduction

OCR-Stats

Contains functions to estimate oxygen consumption rates using the Seahorse XF Analyzer, and perform statistical testing between samples. Includes plotting functions as well. Manuscript in Plos ONE.

Installing requirements

R

Install the following R packages using install.packages():

  • data.table
  • dplyr
  • ggplot2
  • ggthemes
  • magrittr
  • plotly
  • tidyr

General repository organization notes

Source the config.R file to load all necessary functions and variables. Go through the example.R which should give a direct idea of the functions and plots available.

There are 2 folders:

  • functions: contains different functions needed for the statistical OCR-stats methods.
  • plots: contains different plot functions. They are all created using ggplot, therefore they can be saved and edited.

R should be started from the repository root.

All data located in data/.

Main functions explained

  • add_outlier_col(): adds 2 T/F columns (is.outw and is.out) to the given dataset indicating if the OCR value is a well level or single point outlier.
  • compute_bionergetics(): computes all four OCR interval levels in natural and log scales. Also provides bioenergetics in the natural scale (eg. maximal respiration) and in the log scale (eg. M/Ei ratio)
  • stat_test_OCR(): compares the bioenergetics of 2 samples providing an estimate with the difference and pvalue. Returns a list with 2 objects: dif_dt: for each pair of samples to be compared, gives the bioenergetics of each of them, and the respective difference; pv_dt: for each sample, returns one between-plates replicates aggregated difference wrt to a control and a pvalue.
  • sh_plot(): plots a whole Seahorse experiment, differentiating samples by color. Can produce points, boxplots or violin plots. Returns a ggplot object that can be further edited.
  • outlier_plot(): plots a single sample, highlighting outlier status. Returns a ggplot object that can be further edited.
  • plot_bios(): plots the specified bioenergetics difference wrt to a control of all samples. Marks as red significant samples.
  • sh_volcano(): creates a volcano plot, where the x axis is the bioenergetic difference wrt a control and the y-axis the -log10 of the pvalue. Samples above the horizontal dotted line are significant.
  • scatterplot_bios(): creates a scatterplot of 2 different bioenergetic differences.

Support

Let me know if you have any problems by creating an issue or sending an email to yepez-at-in.tum.de.

ocr-stats's People

Contributors

vyepez88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ocr-stats's Issues

argument "PT" is missing in example.R?

Dear Yepez,

I just ran an example.R, and found an error.
plot_bios(dif_dt, bio = "MEi") will show following error message.

Error in plot_bios(dif_dt, bio = "MEi") :
argument "PT" is missing, with no default

Would you fix it? Thanks.

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.