predict_affinity: Assings to the repertoire sequencing data a scalar value...

Description Usage Arguments Value Examples

View source: R/regression_models.R

Description

Assings to the repertoire sequencing data a scalar value representing the predicted affinity for each cell/clonotype (the lower the value the higher the affinity). This can be done both at the clonotype level or at the single cell level.

Usage

1
2
3
4
5
6
7
predict_affinity(
  features,
  unique.sequences = c("aa_sequence_HC", "aa_sequence_LC"),
  encoding = "onehot",
  to.use = c("cdr3s_aa", "cdr3s_nt", "aa_sequence_HC", "aa_sequence_LC"),
  cv = 5
)

Arguments

features

List of dataframes containing the extracted features. This is the output of load_data function.

unique.sequences

Names of the sequences to be kept. Default is c("aa_sequence_HC", "aa_sequence_LC") which keeps every cell with a unique combination of heavy and light chain sequences. Other options include "clonotype_id", "cdr3s_aa", "aa_sequence_HC".

encoding

Character indicating which encoding strategy to use. Options are "onehot", "kmer". Default is set to "onehot".

to.use

Character vector indicating which features to use. If not supplied all the features will be used

cv

Numeric indicating the number of folds used in cross validation. Default is 5.

Value

This function plots the predicted affinity scores against the actual affinities for each model and plots feature importance for XGBoost.

Examples

1
2
3
4
## Not run: 
check_predict_affinity <- predict_affinity(features = output.load_data, unique.sequences = c("aa_sequence_HC", "aa_sequence_LC"), encoding = "onehot", to.use = NULL)

## End(Not run)

rodamian/Bindpred documentation built on July 29, 2021, 7:29 p.m.