knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

PeptidePCA

PeptidePCA contains a small suite of functions that can be used to recreate PCA figures from Hilton et al. (2017). HLA peptide sequences can be transformed into new features using an amino acid conversion matrix and then plotted using PCA. The packages ggplot2 and FactoMineR are required.

Installation

You can install PeptidePCA in R with the following command

library(devtools)
devtools::install_github("ParhamLab/PeptidePCA")

Usage

This is a small vignette to display what PeptidePCA can do

library(PeptidePCA)

## load in example datasets
# conversion matrix using 4 physicochemical properties and amino acid identities
data(convmat.24, package= "PeptidePCA")
colnames(convmat.24)

## convert in ligand files (already done in this example)
# "testdata" is a folder that contains .txt files representing one HLA each,
# with one ligand per line and nothing else.
# ligands.4A= read.ligands("C:/Users/Alex/Documents/testdata")

## load in the preconverted data for this example
data(ligands.4A, package= "PeptidePCA")
summary(ligands.4A)

# create features from example dataset
features.4A= conv.features.list(ligands.4A, convmat.24, 9)

# perform PCA
features.4A.pca= pep.pca(features.4A)

# colors for plotting, taken from http://jfly.iam.u-tokyo.ac.jp/color/
colors= c( "#E69F00", "#0072B2", "#CC79A7", "#009E73")

# plot PCA
pep.pca.plot(pca= features.4A.pca, type= "density", colors= colors)


ParhamLab/PeptidePCA documentation built on June 3, 2019, 7:22 a.m.