Introduction

phipcc in an R package designed to generate R Markdown reports for case-control studies of PhIP-seq data. phipcc builds analysis targets using the drake package from rOpenSci and Will Landau. phipcc also depends on phipmake, epitopefindr, and AVARDA.

This guide is written specifically for the Larman Lab and MARCC. Eventually I will write a more general guide.

Overview

There are two major phipcc functions that the user will interact with.

Currently, define_plan_case_control() and the subsetquent call to drake::make() can be run on MARCC. However, the final step of knitting the final report depends on pandoc, a dependency that I haven’t yet figured out how to get working on MARCC. However, you can copy the necessary files to your local computer and run render_from_template locally.

Software Setup

Local

  1. Install R (3.5+) and RStudio.
  2. In R console, execute:

# Required (for steps that are not yet supported on MARCC)
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("brandonsie/phipcc")
install.packages("pdftools")

# Optional (for steps that can be carried out either locally or on MARCC)
remotes::install_github("ropensci/drake")
remotes::install_github("brandonsie/phipmake")
remotes::install_github("brandonsie/epitopefindr")
remotes::install_github("mhahsler/rBLAST")
remotes::install_github("brandonsie/pdfuniter")
if (!requireNamespace("BiocManager")) install.packages("BiocManager")
BiocManager::install(c("Biostrings", "IRanges", "msa", "S4Vectors"))

Note

epitopefindr also depends on BLAST+ and pdflatex e.g. from TeX Live. I have already installed these for the Larman Lab group on MARCC. From the Larman Lab group MARCC, installations can be sourced by entering: (these steps are already built in to the MARCC phipcc shell script.)

Preparing a Case-Control Study

Prerequisites

phipcc assumes that the phipmake pipeline including AVARDA has already been run on the data for your case and control samples.

Configuration File

A template is provided with field descriptions. In R, you can access this template by running file.copy(system.file("example_config.tsv", package = "phipcc"), "config.tsv"). For now, you will need to edit fields manually.

Description of Each Field

Local report knitting

  1. From your project directory on MARCC, copy the /data/ directory to a new directory on your local computer.
  2. Locally from RStudio, execute the following lines:

setwd("Local_Project_Directory") #Project Directory
phipcc::render_from_template(import_rdata = TRUE)