larmanguide.Rmd
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.
There are two major phipcc functions that the user will interact with.
phipcc::define_plan_case_control()
defines the computational case control plan to be executed by drake::make()
. This function define_plan_case_control
reads configuration settings from config.tsv
, which will be discussed in depth in a later section of this guide.phipcc::render_from_template()
reads in outputs from the case control plan and uses an R Markdown template to generate an HTML report. (the default template is provided in the package system.file("template_case_control.Rmd", package = "phipcc")
, but custom templates can also be used.)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.
cd /data/hlarman1/PhIPdb/Software/install_r_pkg
sbatch --export=pkg="brandonsie/drake" installGithub.sh
sbatch --export=pkg="brandonsie/phipmake" installGithub.sh
sbatch --export=pkg="brandonsie/phipcc" installGithub.sh
# Epitopefindr-specific setup
sbatch --export=pkg="brandonsie/epitopefindr" installGithub.sh
sbatch --export=pkg="mhahsler/rBLAST" installGithub.sh
sbatch --export=pkg="brandonsie/pdfuniter" installGithub.sh
sbatch --export=pkg="Biostrings" installBioc.sh
sbatch --export=pkg="IRanges" installBioc.sh
sbatch --export=pkg="msa" installBioc.sh
sbatch --export=pkg="S4Vectors" installBioc.sh
# 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"))
phipcc
assumes that the phipmake
pipeline including AVARDA
has already been run on the data for your case and control samples.
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.
setwd("Local_Project_Directory") #Project Directory
phipcc::render_from_template(import_rdata = TRUE)