README.md

Barracoda2viz

Leon Eyrich Jessen

Getting started

This package aims at visualising output from the Barracoda 1.0 server

Using Hadley Wickham's brilliant devtools package, we can easily install Barracoda2viz like so:

install.packages("devtools")
devtools::install_github("leonjessen/Barracoda2viz")

Once the package has been installed, we can simply load it like so:

library("Barracoda2viz")

Additional libraries required are:

library("tidyverse")
library("readxl")
library("cowplot")
library("ggseqlogo")
library("PepTools")

Workflow

The easiest way to run the package is by simply calling the workflow wrapper

d = do_barracoda_workflow(
  input_xlsx = 'test_data/test_set_1.xlsx',
  output_png = 'test_data/test_set_1.png')
d
## # A tibble: 4,860 x 21
##    barcode   sample count.1 input.1 input.2 input.3 log_fold_change
##      <chr>    <chr>   <dbl>   <dbl>   <dbl>   <dbl>           <dbl>
##  1  A19B62 4805 20%    1579     431     459     344       3.8411781
##  2  A20B70 4805 20%     275     104     118      90       3.3005942
##  3  A22B64 4805 20%      21     106     123      85      -0.4118250
##  4  A23B71 4805 20%     102     249     258     224       0.6361368
##  5  A25B66 4805 20%      10     111     110      89      -1.4683328
##  6  A19B61 4805 20%    4821    1246    1235    1048       3.9291584
##  7  A20B80 4805 20%      27     158     156     152      -0.6368945
##  8  A22B75 4805 20%      30     247     302     234      -1.2213967
##  9  A23B82 4805 20%    1947     484     559     453       3.8607997
## 10  A20B63 4805 20%    1784     314     381     297       4.3292026
## # ... with 4,850 more rows, and 14 more variables: p <dbl>,
## #   pep.number <chr>, mut_pos <dbl>, mut_res_three <chr>,
## #   mut_res_one <chr>, pep_type <chr>, p_count_1_pos <dbl>,
## #   q_input_1_pos <dbl>, q_input_2_pos <dbl>, q_input_3_pos <dbl>,
## #   q_input_pos_mean <dbl>, KLD_res <dbl>, KLD_pos <dbl>, KLD_height <dbl>

do_barracoda_workflow() calls a sequence of 6 steps:

do_barracoda_workflow
## function(input_xlsx, output_png){
## 
##   # 1. Read raw barracoda data
##   d = read_barracoda_excel(path = input_xlsx)
## 
##   # 2. Clean the raw barracoda data
##   d_clean = d %>% clean_barracoda_data
## 
##   # 3. Augment barracoda data
##   d_clean_aug = d_clean %>% augment_barracoda_data
## 
##   # 4. Compute Kullback Leibler values
##   d_clean_aug_kld = d_clean_aug %>% get_KLD
## 
##   # 5. Create logos
##   d_clean_aug_kld %>% mk_logo(path = output_png)
## 
##   # 6. Return final barracoda data
##   return(d_clean_aug_kld)
## 
## }
## <environment: namespace:Barracoda2viz>


leonjessen/Barracoda2viz documentation built on Feb. 23, 2018, 3:43 p.m.