label_proteins: Label protein positions based on epitope data

View source: R/label_proteins.R

label_proteinsR Documentation

Label protein positions based on epitope data

Description

Takes a data.table of data of class protein_dt (returned by get_proteins()) or windowed_prot_dt (returned by make_window_df()) and labels each protein position based on known epitope/non-epitope regions documented in an epitopes data.table of class joined_epit_dt (returned by prepare_join_df() or by filter_epitopes()).

Usage

label_proteins(
  proteins,
  epitopes,
  set.positive = c("any", "mode", "all"),
  ncpus = 1,
  save_folder = NULL
)

Arguments

proteins

data frame of protein data, returned by get_proteins() or make_window_df().

epitopes

data frame of epitope data, returned by prepare_join_df() or filter_epitopes().

set.positive

how to decide whether a position should be labeled as "Positive" (+1). Use "any" to set a position as positive if it is labeled as $+1$ in at least one entry of epitopes; "mode" to set it by majority voting; or "all" to only label a position as Positive if it has at least one occurrence as $+1$ and none as $-1$. Unlabelled positions receive NA in their Class column.

ncpus

number of cores to use

save_folder

path to folder for saving the results.

Value

A data table of class windowed_prot_dt with columns containing the number of positive and negative labels found for each position of each protein, plus a Class column calculated according to set.positive.

Author(s)

Felipe Campelo (f.campelo@aston.ac.uk)


fcampelo/epitopes documentation built on April 22, 2023, 12:23 a.m.