Predict the exposure status of an independent sample.

pred(comb, indpt, names, field, count, copyrange)

Arguments

comb

List containing both negtive (n) and positive (v) clonotype percentages.

indpt

Vector of independent samples file paths.

names

Vector of labels for independent samples.

field

String containing the column or columns (space-delimited) of interest.

count

String containing the column name for colontype counts.

copyrange

Integer Vector of the min and max copy of a sequence, within a sample, to be considered.

Value

Matrix with % correct predictions from training data.

Examples

FIELD <- "vGeneName aminoAcid jGeneName" COUNT <- "copy" P_CUTOFF <- 0.1 MIN_PUBLIC <- 2 COPY_RANGE <- "1 99" listPos <- tsvDir(system.file("extdata", "Post", package="iCAT")) listNeg <- tsvDir(system.file("extdata", "Pre", package="iCAT")) naive <- readTrn(listNeg, FIELD, COUNT, COPY_RANGE, "naive") vaccs <- readTrn(listPos, FIELD, COUNT, COPY_RANGE, "vacc") mod <- train(naive, vaccs, listNeg, listPos, FIELD, COUNT, COPY_RANGE, P_CUTOFF, MIN_PUBLIC, NULL) pred(mod, system.file("extdata", "Pre", "KJW100_HLA-A2_10_PRE.tsv", package="iCAT"), "unknown-sample-label", FIELD, COUNT, COPY_RANGE)
#> Sample Prediction % TARS #> [1,] "unknown-sample-label" "Negative" "0"