predict_amps {ampir} | R Documentation |
Predict the antimicrobial peptide probability of a protein
Description
This function predicts the probability of a protein to be an antimicrobial peptide
Usage
predict_amps(faa_df, min_len = 5, n_cores = 1, model = "precursor")
Arguments
faa_df |
A dataframe obtained from |
min_len |
The minimum protein length for which predictions will be generated |
n_cores |
On multicore machines split the task across this many processors. This option does not work on Windows |
model |
Either a string with the name of a built-in model (mature, precursor), OR, A train object suitable for passing to the predict.train function in the caret package. If omitted the default model will be used. |
Value
The original input data.frame with a new column added called prob_AMP
with the probability of that sequence to be an antimicrobial peptide. Any sequences that are too short or which contain invalid amin acids will have NA in this column
Examples
my_bat_faa_df <- read_faa(system.file("extdata/bat_protein.fasta", package = "ampir"))
predict_amps(my_bat_faa_df)
# seq_name prob_AMP
# [1] G1P6H5_MYOLU 0.9723796