Skip to contents

This function computes the perturbation scores of the aaCDR3 length distribution within each V gene.

Scores are calculated as a distance between each repertoire and the mean of the control group using the ISEApeaks method (Colette and Six., 2002).

Usage

perturbationScore(
  x,
  ctrl.names,
  distance = c("manhattan", "euclidean", "canberra", "minkowski", "maximum"),
  p = 2
)

Arguments

x

an object of class RepSeqExperiment

ctrl.names

a vector of characters indicating the sample_ids to be used as controls.

distance

a character specifying the distance method to be used in the calculation of the perturbation scores. Should be one of the following: "manhattan", "euclidean", "canberra", "minkowski" or "maximum".

p

an integer indicating the power of the Minkowski distance. Default is 2.

Value

a data frame containing the perturbation scores for each V-gene.

Examples


data(RepSeqData)
pert <- perturbationScore(RepSeqData,
                          ctrl.names = c("tripod-30-813",
                                         "tripod-30-815",
                                         "tripod-31-846"),
                          distance = "manhattan")