Code Monkey home page Code Monkey logo

microbiouoe's Introduction

MicrobioUoE

MicrobioUoE is an R package built to allow sharing of R code and functions between the lab groups of Angus Buckling and Edze Westra. As we do very similar analyses and use similar code, this should act as an easy way to share R code.

For problems and suggestions please email Daniel Padfield [email protected]

Installation

Installation of packages from GitHub is relatively straightforward.

# firstly need to make sure devtools is installed
install.packages('devtools')

# install MicrobioUoE
devtools::install_github('padpadpadpad/MicrobioUoE')

Functions

  • bind_biolog_sheet()
    • cleans and binds biolog data on a single sheet of an excel spreadsheet. Returns a dataframe where each substrate is a column and each row is a separate plate. The values in each column are the OD readings of that plate in that substrate.
  • bind_biolog_all()
    • cleans and binds biolog data across multiple sheets of an excel spreadsheet. Returns a dataframe where each substrate is a column and each row is a separate plate. The values in each column are the OD readings of that plate in that substrate. Also includes columns for the sheet and plate of each row.
filename <- '~/Desktop/biolog_data.xlsx'
sheets <- paste0('S', 1:10, sep = '')


MicrobioUoE::bind_biolog_all(filename, sheets)
  • stock_sol_vol()
    • calculates the amount of volume needed to dilute a stock solution to a required concentration and volume
MicrobioUoE::stock_sol_vol(stock_sol_conc = 0.75, new_sol_conc = 0.2, new_sol_vol = 1000)
#> [1] 266.6667
  • calc_norm_OD()
    • takes an csv of OD readings and writes another csv of the required volumes to normalise the concentrations across samples
MicrobioUoE::calc_norm_OD('first_OD_readings.csv', 
                          'df_volumes.csv', 
                          new_sol_conc = 0.1,
                          new_sol_vol = 1000,
                          control = 0.035)
  • moveRmdOutput()
    • Automatically moves .Rmd Output files into a separate folder after rendering. Just need to specify the Rmarkdown folder and the Output folder
MicrobioUoE::moveRmdOutput('~/Desktop/My_experiment/Rmd_path', '~/Desktop/My_experiment/Output_path')
  • package_install_all()
    • Allows the installation of packages from CRAN, GitHub and Bioconductor at the same time. This is useful when you are starting a new analysis and already have a list of packages you need to use.
cran_packages <- c('dplyr', 'ggplot2', 'tidyr')
github_packages <- c('padpadpadpad/nlsLoop')
bioc_packages <- c('phangorn')

MicrobioUoE::package_install_all(cran_packages, github_packages, bioc_packages)
#> Downloading GitHub repo padpadpadpad/nlsLoop@master
#> from URL https://api.github.com/repos/padpadpadpad/nlsLoop/zipball/master
#> Installing nlsLoop
#> Installing shiny
#> '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file  \
#>   --no-environ --no-save --no-restore --quiet CMD INSTALL  \
#>   '/private/var/folders/bw/019yc5_138qdgk1xsbz3l99r0000gn/T/RtmpTUi5q3/devtools11ef2bd24dae/shiny'  \
#>   --library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library'  \
#>   --install-tests
#> 
#> '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file  \
#>   --no-environ --no-save --no-restore --quiet CMD INSTALL  \
#>   '/private/var/folders/bw/019yc5_138qdgk1xsbz3l99r0000gn/T/RtmpTUi5q3/devtools11ef69cb272c/padpadpadpad-nlsLoop-9508a1f'  \
#>   --library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library'  \
#>   --install-tests
#> 
#> [1] "Huzzah all the packages are installed"

Suggestions for functions

If you have a piece of code you use regularly or a set of functions you use all the time and would like to integrate those into this package for others to use as well, please email at the address above or comment on the Issues tab.

Alternatively come find me for a chat about how I can help.

microbiouoe's People

Contributors

padpadpadpad avatar

Watchers

 avatar  avatar  avatar

Forkers

juadiegaitan

microbiouoe's Issues

Functions to add

Add the extra_functions from the sequencing pipeline

Function for back calculating CFUs and PFUs

Add functions for getting data out of betadisper for plotting

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.