EpitoScope

DOI

Shiny App for visualization of immunopeptidomics data

Table of Contents

Features

Installation

Requires R version 4.3+

There are two options to install Epitoscope:

  1. Build via Github

*Requires Rtools (https://cran.rstudio.com/bin/windows/Rtools/)

install.packages(c("BiocManager", "remotes"))
BiocManager::install("yannic-chen/EpitoScope")
  1. Install via R-universe
  install.packages("EpitoScope",repos = c("https://yannic-chen.r-universe.dev","https://bioc.r-universe.dev",getOption("repos")))

WSL and netMHCpan

Since netMHCpan only runs on linux, we need to install WSL (Windows Subsystem for Linux) on windows systems. Then we install netMHCpan on the WSL.

Installing WSL on Windows

  1. Open PowerShell as Administrator. You can search it in the windows search bar.
  2. Install WSL by running:
wsl --install
  1. Restart your computer to apply the changes.
  2. You will need to set up an account. For more details, refer to the official WSL documentation.

Installing netMHCpan on WSL

Why this matters — how EpitoScope finds netMHCpan

EpitoScope calls WSL non-interactively from R (system2("wsl", ...)). A non-interactive shell does not load your login profile (~/.bashrc, ~/.profile), so any PATH you customise there is invisible to the app. EpitoScope only sees WSL's minimal default PATH: /usr/local/bin, /usr/bin, /bin, /usr/sbin, /sbin,...

Therefore netMHCpan must be reachable from one of those directories. You have two options:

  1. Open a WSL terminal Open CMD or PowerShell (search bar), then start WSL:
wsl
  1. install tcsh and gawk
  sudo apt-get update && sudo apt-get install -y tcsh gawk
  1. Download netMHCpan and netMHCIIpan

  2. Move the archive into WSL (optional)

Your Windows drives are mounted under /mnt in WSL. For example, your Downloads folder is usually at /mnt/c/Users/USERNAME/Downloads/. To copy the archive to your WSL home directory (~):

cp /mnt/c/Users/USERNAME/Downloads/netMHCpan-4.2.tar.gz ~
cd ~
  1. Extract the file:
tar -xvf netMHCpan-4.2.tar.gz
cd netMHCpan-4.2
  1. Set the NMHOME environment as described by netMHCpan Readme.

    Get absolute path of the current directory and copy it:

pwd 

Open the launcher script and set NMHOME to that path:

nano netMHCpan 

replace the path after setenv NMHOME with your path. (Save and exit press: Ctrl+O, Enter, Ctrl+X)

  1. Create a symlink to the netMHCpan path in the /usr/local/bin directory. (It is one of the directories in default PATH when invoking WSL from R)::
sudo ln -s "/absolute/path/to/netMHCpan-4.2/netMHCpan" /usr/local/bin/netMHCpan

(this is the same absolute path you copied in step 6) 8. Test the installation by running:

netMHCpan -h

The same steps for NetMHCIIpan, just make sure to adjust the names

Usage

Run the app via:

EpitoScope::run_app(data)

where data is your list of named dataframes or the annotation table.

Adding custom schema

The current predefined schemas can be viewed in EpitoScope/R/global.R:

alt text

Futhermore, Just below the column_schema variable is the signature variable, which is used to automatically detect the input data format based on a unique column specific to that software output:

alt text

The App generates a "generic" schema which is the collection of all schemes and is used if no signature can be assigned to the input data.

Custom format can be assigned on-the-go as part of a variable. For the custom column_schema the minimum requirement is either "PEPTIDE" or "STRIPPED" column. Missing column will be filled with empty data if not deriveable. A custom signature is optional, but is helpful to identify the data format to assign the schema. Multiple custom schema can be included:

alt text

If for some reason, the signature or schema might clash with the default data, one can opt to replace the default schema with the custom schema by setting replace_schema = TRUE. Both the custom schema/signature and the replace schema are set as variables when calling `run_app:

EpitoScope::run_app(data, custom_schema = custom_schema, custom_signature = custom_signature, replace_schema = TRUE)

Loading from annotation table.

It is possible to give a dataframe representing an annotation table from which data is automatically loaded instead of a list of named dataframes with the given data. In the former case, the annotation table needs to have specific formats and conditions. The two mandatory columns are: name and source.

An example file can be found under EpitoScope/inst/extdata/test_annotation.csv

Columns other than the ones displayed below can be included and will be displayed in the app and report for documentation purpose only.

Column Description
Name (Mandatory) This will be the displayed name for a dataset, also called sample name. Multiple sources can be associated to the same name. In that case the data will be row bound together.
Source (Mandatory) This is path to the file to be read. Currently only .tsv, .csv, .txt and .parquet files are supported.
Measurement (Optional) This is used to access individual measurements in a given dataset. One measurement here must associate to exactly to 1 data column. String search is used, so the name can be a substring of the official data column. It is case-insensitive. R-loading resolves problematic column names by converting certain symbols. In such a case it might be worth checking how the loaded names look like.
Biological_replicate (Optional) can be any string or number
Technical_replicate (Optional) can be any string or number
Condition (Optional) can be any string . Multiple condition columns can exist. In that case, the column name keeps the "condition" prefix and add a suffix: e.g. "condition_1"

WIP

Task List

Maybe?