make_window_df: Assemble a sliding window representation of epitope or...

View source: R/make_window_df.R

make_window_dfR Documentation

Assemble a sliding window representation of epitope or protein data

Description

Casts epitope or protein data into a dataframe where rows correspond to a fixed-length window centred on consecutive positions of each sequence.

Usage

make_window_df(df, save_folder = NULL, window_size = NULL, ncpus = 1)

Arguments

df

data frame of epitope data (returned by prepare_join_df()) or protein data (returned by get_proteins()).

save_folder

path to folder for saving the results.

window_size

positive integer, size of window to use. If df is a data.table of class joined_epitope_dt (returned from prepare_join_df()) then a standard value for this parameter is used automatically if window_size = NULL (this standard value is calculated as $(2 x min_epitope - 1)$, based on the value of min_epitope used in the call to prepare_join_df().

ncpus

positive integer, number of cores to use

Details

The sliding window runs from the first to the last positions of each sequence in the df input (which in turn comes from running prepare_join_df()). If a window extends beyond the limits of the protein it is padded with the first (or last) letter of the sequence.

Value

A data.table object containing the sliding window representation of the input data.

Author(s)

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


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