brandonsie / phipcc

Case-control reports for PhIP-Seq.

Home Page:https://brandonsie.github.io/phipcc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phipcc

R package to build case-control reports from PhIP-Seq data. phipcc depends on multiple other packages including drake, phipmake, epitopefindr. Familiarity with these packages will be useful in working with phipcc.

Setup

  1. In R console, execute:
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("ropensci/drake")
remotes::install_github("brandonsie/phipmake")
remotes::install_github("brandonsie/epitopefindr")
remotes::install_github("brandonsie/phipcc")

Additional epitopefindr-specific setup steps

  1. Install a TeX distribution with pdflatex. (e.g. MiKTeX (version 2.9+)). (Optional; used to convert multiple sequence alignment TeX files to PDF.)
  2. Install pdftk (version 2.02+). (Optional; used to merge individual PDFs into a single file.)
  3. In R console, execute:
if (!requireNamespace("BiocManager")) install.packages("BiocManager")
BiocManager::install(c("Biostrings", "IRanges", "msa", "S4Vectors"))
remotes::install_github("mhahsler/rBLAST")  

Usage

# Load and attach main libraries
library(phipcc)
library(drake)
library(magrittr)

# Setup phipcc configuration file
# A template is provided with field descriptions. For now, you will need to edit fields manually.
file.copy(system.file("example_config.tsv", package = "phipcc"), "config.tsv")

# Prepare drake plan
drake::expose_imports("phipcc")
plan <- phipcc::define_plan_case_control(config_name = "config.tsv")

# Build targets specified in plan
drake::make(plan)

# Incorporate targets from drake into R Markdown report
# Should be called from the same working directory as drake::make(plan)
phipcc::render_from_template()

You can use your own template as well. The default template can be accessed and modified from `system.file("template_case_control.Rmd", package = "phipcc")`. To use a custom template, specify `phipcc::render_from_template(template = "path_to_my_template.Rmd")`

About

Case-control reports for PhIP-Seq.

https://brandonsie.github.io/phipcc/


Languages

Language:R 100.0%